Skip to content
English
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

PropTypeDefaultWhat it does
locale'en' | 'zh-CN' | 'es' | 'ja''en'Language of the built-in text, dates and the sample week.
appointmentsArray<{ id, day: 'YYYY-MM-DD', start: 'HH:MM', minutes, service, stylist, client }>sample weekThe bookings. Their tint follows the category of their service; an empty array shows the empty state above a bookable week.
services / stylistsArray<{ id, name, minutes, price, category }> / Array<{ id, name, does? }>sample salonWhat can be booked, and who does it (`does` limits a stylist to some categories).
categoriesArray<{ id, name, tone?: 'secondary' | 'tertiary' | 'neutral' }>cut, colour, careThe 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' / todayThe time now (earlier slots cannot be booked; the line starts there) and the day shown first.
closed / currencynumber[] / string[0] / by localeWeekdays the salon is closed (0 is Sunday); the ISO currency code of the prices.
loadingbooleanfalseShows 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.
labelsobject—Replaces any built-in text (keys as in copy.js).
classNamestring—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.