Skip to Content
Urban Cowboy
Components

SearchBar

Booking search summary with date, guest and offer controls.

SearchBar composes the date, guest and offer selectors with the shared SearchButton. The demos keep click state in a docs-only harness; they do not call the Mews API or start a booking.

boolean

Variants

The variant prop switches between circle and square action buttons.

boolean

Loading state

boolean
PropValuesNotes
variantcircle, squareShape of the search action
dateLabel / dateValuestringDate selector copy
guestLabel / guestValuestringGuest selector copy
promoLabel / promoValuestringOffer selector copy
isLoadingbooleanLoading presentation
onSearch, onDateClick, onGuestClick, onPromoClickcallbacksDocs harness records the last action locally

Responsive behaviour

The selector fields wrap on narrow screens and keep accessible labels. The search action does not shrink below its touch target.

Expanded search panel

SearchBarExpanded is the composite variant that keeps property, dates, guests and promo controls in one bar. The demo uses initialValues and local callbacks; it does not validate a promo code or start a search.

PropValuesNotes
variantcircle, squareSearch action shape
initialValuesproperty, checkInDate, checkOutDate, guests, promoCodeUncontrolled starting values
onSectionClick(section) => voidReports which dropdown is open (property, dates, guests, promo or null)
onValuesChange(values) => voidReports edited values
onSearch(values) => voidDocs harness records the action only
dropdownPlacementabove, belowDropdown position relative to the bar

The individual dropdowns are documented on the Search dropdowns, DateRangePicker, TravelPartyButton and SearchButton pages.

View source · View expanded source