Service And Slot Picker
A single hairline-bordered panel split into three independent sections: a selectable service list, a horizontally scrollable strip of day buttons, and a time slot grid. Each section has its own real single-select state, letting a visitor pick a service, a day, and a time slot in any order.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/service-and-slot-picker.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/booking/booking24.tsx instead.
Usage
The file also exports booking24Demo, 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 { Booking24, booking24Demo } from "@/components/blocks/booking/booking24"; export default function Page() { return <Booking24 {...booking24Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Book a service" | Section heading above the panel. |
| description | string | none | Short subheading under the heading. |
| services | BookingService[] | none | Selectable services in the first section. |
| days | DayOption[] | none | Day buttons in the horizontally scrollable strip. |
| timeSlots | string[] | none | Time slot labels shown in the grid, reused for whichever day is selected. |
| className | string | none | Extra classes for the outer section element. |
Types
interface BookingService { id: string; name: string; duration: string; price: string; } interface DayOption { id: string; label: string; }
Behavior notes
- selectedServiceId, selectedDayId, and selectedTime are three independent real useState values; clicking any item in any section updates only that section's state.
- The day strip scrolls horizontally (overflow-x-auto) on narrow viewports instead of wrapping.
- The time slot grid reuses the same timeSlots list regardless of which day is selected, since per-day availability isn't modeled in this block.
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.