Search Bar Hero
A horizontal search bar with a location input, a Dates button that toggles a small panel with real check-in/check-out date pickers, a Guests button that toggles a panel with real +/- counters for adults, children, and rooms, and a Search button. Stacks vertically on mobile, lays out in a row from the sm breakpoint up.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/search-bar-hero.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/booking/booking12.tsx instead.
Usage
The file also exports booking12Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Booking12, booking12Demo } from "@/components/blocks/booking/booking12"; export default function Page() { return <Booking12 {...booking12Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Find your next stay" | Heading above the search bar. |
| locationPlaceholder | string | "Search destinations" | Placeholder text for the location input. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- The Dates button is real client state: clicking it opens/closes a panel with two real native date inputs (check-in, check-out), and the button label updates to show the chosen range.
- The Guests button is real client state: clicking it opens/closes a panel with real +/- counters for Adults, Children, and Rooms, each with its own useState and a sensible minimum, and the button label reflects the current counts.
- The Search button is decorative only, no search is actually performed.
More Booking Blocks
View all →date-time-picker
Date & Time Picker
Split-panel scheduler: a real monthly calendar on the left, morning/afternoon time slots on the right, and a live booking summary footer.
reservation-summary
Reservation Summary
A static booking confirmation card with service, date/time, provider avatar, price breakdown, promo code field, and cancellation policy.
appointment-list
Appointment List
Upcoming and past appointments grouped by date, with provider avatar, status badge, and reschedule/cancel actions.
service-selector
Service Selector
Category-tabbed grid of bookable services with icon, description, duration, and price.
provider-picker
Provider Picker
A selectable grid of staff/provider cards with rating, reviews, availability, and an Any Provider fallback.
restaurant-reservation
Restaurant Reservation
Table reservation form with a guest stepper, date/time inputs, seating pills, and a live summary panel.