Usage
import { BookingSummary } from './BookingSummary.jsx'
// Without callbacks it confirms the sample visit after a short wait. Wire it to your booking:
<BookingSummary
locale="en"
currency="USD"
day="2026-12-08"
time="10:30"
services={[{ id: 'cut', name: 'Cut & blow-dry', minutes: 60, price: 65 }]}
stylist={{ name: 'Mara', role: 'Senior stylist', look: 'long', tone: 'secondary' }}
address="14 Linden Row"
heldUntil={hold.expiresAt} // ms timestamp; the countdown starts at once
onHoldAgain={() => hold.renew()} // resolve with the new expiry
onConfirm={async ({ note, reminder }) => (await book({ note, reminder })).reference}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
locale | 'en' | 'zh-CN' | 'es' | 'ja' | 'en' | Language of the text, dates, times and prices. |
day / time | 'YYYY-MM-DD' / 'HH:MM' | sample visit | When the visit starts, in the salon’s local time. |
services | Array<{ id, name, minutes, price }> | sample services | What is booked; minutes add up to the end time and prices to the total. |
stylist | { name, role, avatar?, look?, tone? } | sample stylist | Who does the work; look and tone draw the portrait, avatar (an image URL) replaces it. |
address / currency | string | by locale | Where, and the ISO currency code of the prices. |
freeChangeHours | number | 24 | Until how many hours before the visit it can be changed for free. |
heldUntil | number | — | When the host’s hold on the time ends (ms timestamp); the countdown starts at once. Without it the sample hold starts at the first touch. |
defaultReminder | boolean | true | Whether the reminder starts ticked. |
loading | boolean | false | Shows the skeleton of the card while it loads. |
error | boolean | string | false | Shows that the booking did not go through, with a retry; a string replaces its sentence. |
onConfirm | ({ note, reminder }) => Promise<string | void> | — | Books the visit; resolve with the reference to show it, reject to show the error. |
onHoldAgain | () => Promise<number | void> | — | Holds the time again after the hold ended; resolve with the new end. |
onAddToCalendar | ({ day, time, minutes, reference }) => void | — | Replaces the built-in .ics download. |
onDone / onRetry | () => void | — | After booking, to start again; and the error banner’s retry (by default it confirms again). |
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.
BookingSummary.jsxbooking-summary.csscopy.jskit.jsxkit.cssui/base-button/ui/alert-banner/ui/success-check/ui/checkbox/ui/textarea/ui/skeleton-shimmer/tokens.cssREADME.md
The block, its stylesheet and text, the shared kit, the components it uses and tokens.css install together into one folder.