Skip to content
English

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

PropTypeDefaultWhat it does
locale'en' | 'zh-CN' | 'es' | 'ja''en'Language of the built-in text and sample menu.
servicesArray<{ id, category, name, minutes, price, popular?, icon? }>sample menuWhat can be booked; icon replaces the sign of its category. An empty array shows the empty state.
categoriesArray<{ id, name, icon? }>sample categoriesThe tabs, in order. Categories without services are left out. icon is the sign on their cards: a kit icon name, “drop” or a node.
stylistsArray<{ id, name, role, avatar?, look?: 'short' | 'long' | 'bun', tone?, does? }>sample stylistsWho 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.
currencystringby localeISO currency code for every price.
defaultValuestring[]the popular serviceServices chosen at first.
defaultStyliststringthe first stylistStylist chosen at first; 'any' for anyone.
loadingbooleanfalseShows the skeleton of the menu while it loads.
errorboolean | stringfalseShows 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.
labelsobject—Replaces any built-in text (keys as in copy.js).
classNamestring—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.