Skip to content
English

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

PropTypeDefaultWhat 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 visitWhen the visit starts, in the salon’s local time.
servicesArray<{ id, name, minutes, price }>sample servicesWhat is booked; minutes add up to the end time and prices to the total.
stylist{ name, role, avatar?, look?, tone? }sample stylistWho does the work; look and tone draw the portrait, avatar (an image URL) replaces it.
address / currencystringby localeWhere, and the ISO currency code of the prices.
freeChangeHoursnumber24Until how many hours before the visit it can be changed for free.
heldUntilnumber—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.
defaultReminderbooleantrueWhether the reminder starts ticked.
loadingbooleanfalseShows the skeleton of the card while it loads.
errorboolean | stringfalseShows 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).
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.

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.