YYonda UI Docs

HotelSearchBar

Canonical hotel search bar composing LocationAutocomplete, DateRangePicker, and GuestRoomSelector. Presentational only — fires onSearch(value) on valid submit. Brand-token themed, responsive.

Validation

Destination is required. Dates are optional, but if a check-in is set the check-out must also be provided. Errors appear inline below the bar and clear as the user corrects each field.

Click Search without filling in a destination to see inline validation.

Pre-filled value

Pass a fully populated HotelSearchBarValue to render the bar in a pre-filled state — useful for a search results page where the bar reflects the active query.

Props reference

PropTypeDefaultDescription
brandKnownBrandIdrequiredDrives BrandedButton theming
valueHotelSearchBarValuerequiredControlled value { destination, dateFrom, dateTo, guests }
onSearch(value: HotelSearchBarValue) => voidrequiredCalled on valid submit — parent owns navigation
suggestionsLocationSuggestion[]—Suggestion list passed to LocationAutocomplete
fetchSuggestions(query: string) => void—Called (debounced) when user types in destination
maxRoomsnumber8Maximum rooms in GuestRoomSelector
maxAdultsnumber8Maximum adults per room
maxChildrennumber4Maximum children per room
maxChildAgenumber17Maximum child age in age selects
destinationPlaceholderstring"Where to?"Placeholder for the destination input
datePlaceholderstring"Anytime"Placeholder for the date range picker
guestPlaceholderstring"Guests & rooms"Placeholder for the guest selector
submitLabelstring"Search"Label on the submit button
disabledbooleanfalseDisables the submit button
loadingbooleanfalseRenders a spinner + aria-busy on the submit button, blocks onSearch while true
classNamestring—Extra classes on the root wrapper