Week calendar comes with Pro. Its preview shows once you unlock it.
Usage
import { BookingWeek } from './BookingWeek.jsx'
// Without onBook or onCancel, both finish after a short wait.
<BookingWeek
locale="en"
currency="USD"
now={new Date().toISOString().slice(0, 16)} // 'YYYY-MM-DDTHH:MM'
appointments={bookings} // [{ id, day: 'YYYY-MM-DD', start: 'HH:MM', minutes, service, stylist, client }]
categories={kinds} // [{ id, name, tone: 'secondary' | 'tertiary' | 'neutral' }]: the legend and the tints
services={menu} // [{ id, name, minutes, price, category: a category id }]
stylists={team} // [{ id, name, does?: [category ids] }]
loading={!bookings}
onBook={async (booking) => (await api.book(booking)).ok}
onCancel={async (booking) => (await api.cancel(booking.id)).ok}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
locale | 'en' | 'zh-CN' | 'es' | 'ja' | 'en' | Language of the built-in text, dates and the sample week. |
appointments | Array<{ id, day: 'YYYY-MM-DD', start: 'HH:MM', minutes, service, stylist, client }> | sample week | The bookings. Their tint follows the category of their service; an empty array shows the empty state above a bookable week. |
services / stylists | Array<{ id, name, minutes, price, category }> / Array<{ id, name, does? }> | sample salon | What can be booked, and who does it (`does` limits a stylist to some categories). |
categories | Array<{ id, name, tone?: 'secondary' | 'tertiary' | 'neutral' }> | cut, colour, care | The kinds of service, in legend order: each names a category of `services` and gives its bookings their tint. |
now / day | 'YYYY-MM-DDTHH:MM' / 'YYYY-MM-DD' | '2026-12-08T11:20' / today | The time now (earlier slots cannot be booked; the line starts there) and the day shown first. |
closed / currency | number[] / string | [0] / by locale | Weekdays the salon is closed (0 is Sunday); the ISO currency code of the prices. |
loading | boolean | false | Shows the skeleton of the week. |
onBook / onCancel / onDayChange | (booking) => Promise<boolean | void> / (booking) => Promise<boolean | void> / (day) => void | — | Saves a drafted booking; cancels one; the chosen day changed. Resolve false to keep the draft or the booking. |
labels | object | — | Replaces any built-in text (keys as in copy.js). |
className | string | — | Added to the root section. |
Add it to your project
Pro includes the full source of this block. Copy its prompt to install it with your coding agent.
BookingWeek.jsxbooking-week.csscopy.jskit.jsxkit.cssui/base-button/ui/empty-state/ui/chip-group/ui/text-input/ui/skeleton-shimmer/ui/week-strip/ui/popover/tokens.cssREADME.md
The block, its stylesheet and text, the shared kit, the components it uses and tokens.css install together into one folder.
