YYonda UI Docs

TourSearchBar

Canonical tour search bar composing LocationAutocomplete, DateRangePicker, and a traveller-count Select. Presentational only — fires onSearch(value) on valid submit. Parallels HotelSearchBar but with a single traveller count instead of GuestRoomValue.

Validation

Destination is required. Dates are optional; if a start date is set the end date must also be provided and can't precede it. 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 TourSearchBarValue to render the bar in a pre-filled state — useful on the search results page where the bar reflects the active query.

Props reference

PropTypeDefaultDescription
valueTourSearchBarValuerequiredControlled value { destination, dateFrom, dateTo, travellers }
onSearch(value: TourSearchBarValue) => voidrequiredCalled on valid submit — parent owns navigation
suggestionsLocationSuggestion[]—Suggestion list passed to LocationAutocomplete
fetchSuggestions(query: string) => void—Called (debounced) when user types in destination
maxTravellersnumber12Maximum traveller count in the Select dropdown
destinationPlaceholderstring"Where to?"Placeholder for the destination input
datePlaceholderstring"Anytime"Placeholder for the date range picker
travellerPlaceholderstring"Travellers"Placeholder for the traveller Select
submitLabelstring"Search"Label on the submit button
disabledbooleanfalseDisables the submit button
classNamestring—Extra classes on the root wrapper