Usage
import { BookingServices } from './BookingServices.jsx'
// Without callbacks it runs on the sample salon menu. Wire it to your booking flow:
<BookingServices
locale="en"
currency="USD"
categories={[{ id: 'cut', name: 'Cut & style', icon: 'scissors' }, { id: 'colour', name: 'Colour', icon: 'drop' }]}
services={menu.services} // [{ id, category, name, minutes, price, popular?, icon? }]
stylists={menu.stylists} // [{ id, name, role, avatar?, look?, tone?, does? }]
defaultValue={['cut']} // without it the popular service starts chosen
loading={menu.loading}
error={menu.error}
onRetry={menu.reload}
onContinue={async ({ services, stylist, minutes, price }) => goToTimes({ services, stylist, minutes })}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
locale | 'en' | 'zh-CN' | 'es' | 'ja' | 'en' | Language of the built-in text and sample menu. |
services | Array<{ id, category, name, minutes, price, popular?, icon? }> | sample menu | What can be booked; icon replaces the sign of its category. An empty array shows the empty state. |
categories | Array<{ id, name, icon? }> | sample categories | The tabs, in order. Categories without services are left out. icon is the sign on their cards: a kit icon name, “drop” or a node. |
stylists | Array<{ id, name, role, avatar?, look?: 'short' | 'long' | 'bun', tone?, does? }> | sample stylists | Who can do the work. avatar (an image URL) replaces the drawn portrait. `does` lists the categories a stylist takes; they grey out when a chosen service is outside it. |
currency | string | by locale | ISO currency code for every price. |
defaultValue | string[] | the popular service | Services chosen at first. |
defaultStylist | string | the first stylist | Stylist chosen at first; 'any' for anyone. |
loading | boolean | false | Shows the skeleton of the menu while it loads. |
error | boolean | string | false | Shows the error banner with a retry button; a string replaces its sentence. |
onChange | (ids) => void | — | The chosen services changed. |
onStylistChange | (id) => void | — | The stylist changed, also when the block falls back to 'any'. |
onContinue | ({ services, stylist, minutes, price }) => Promise | void | — | The visitor goes on to choose a time; the button waits for a returned promise. |
onRetry / onCall | () => void | — | From the error banner, and from the empty state. |
labels | object | — | Replaces any built-in text (keys as in copy.js). |
className | string | — | Added to the root element; other attributes go there too. |
Add it to your project
Copy the prompt into Codex or Claude Code. The agent reads the published source, shows you what it will write and adds the block together with the components it is built from.
BookingServices.jsxbooking-services.csscopy.jskit.jsxkit.cssui/base-button/ui/empty-state/ui/rolling-number/ui/alert-banner/ui/success-check/ui/skeleton-shimmer/ui/sliding-tabs/tokens.cssREADME.md
The block, its stylesheet and text, the shared kit, the components it uses and tokens.css install together into one folder.