Skip to content
English
My visits comes with Pro. Its preview shows once you unlock it.

Usage

import { BookingAppointments } from './BookingAppointments.jsx'

// Without callbacks every action runs on the sample visits. Wire it to your bookings:
<BookingAppointments
  locale="en"
  currency="USD"
  now={new Date().toISOString().slice(0, 16)}
  visits={account.upcoming}     // [{ id, day, time, minutes, title, price, stylist, avatar?, look?, tone?, status }]
  past={account.past}
  offers={freeTimes}            // [{ day, time }] offered when moving a visit
  lateHours={24}
  lateFee={0.5}
  onReschedule={(visit, { day, time }) => api.move(visit.id, day, time)}
  onCancel={(visit) => api.cancel(visit.id)}
  onUndo={(visit) => api.restore(visit.id)}
  onRebook={async (visit) => (await api.rebook(visit.id)).slot}
  onBook={() => router.push('/book')}
/>

Props

PropTypeDefaultWhat it does
locale'en' | 'zh-CN' | 'es' | 'ja''en'Language of the text, dates, times and prices.
visitsArray<{ id, day, time, minutes, title, price, stylist, avatar?, look?, tone?, status: 'confirmed' | 'pending' | 'moved' }>sample visitsUpcoming visits; avatar (an image URL) replaces the drawn portrait. A new array replaces them; moves and cancels then live in the block. An empty array shows the empty state.
pastArray<{ id, day, time, title, price, stylist, look?, tone? }>sample historyPast visits, newest first, each with “book again”.
offersArray<{ day, time }>three sample timesFree times offered when a visit is moved.
now'YYYY-MM-DDTHH:MM''2026-12-08T12:00'The current time, for “tomorrow” and the late fee. The sample uses a fixed time.
lateHours / lateFeenumber24 / 0.5Cancelling within that many hours costs that share of the price; the second step says how much.
currencystringby localeISO currency code of the prices.
loadingbooleanfalseShows the skeleton of the list while it loads.
errorboolean | stringfalseShows the error banner with a retry button; a string replaces its sentence.
onReschedule(visit, { day, time }) => Promise | void—Moves a visit; the button waits for a returned promise.
onCancel(visit) => Promise | void—Cancels a visit after its second step; reject to keep it and shake the button.
onUndo(visit) => void—A cancelled visit was put back within six seconds.
onRebook(visit) => Promise<{ day, time } | void>—Books a past visit again; resolve with its time to add it to Upcoming.
onBook / onRetry() => void—From the empty state, and from the error banner.
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

Pro includes the full source of this block. Copy its prompt to install it with your coding agent.

BookingAppointments.jsxbooking-appointments.csscopy.jskit.jsxkit.cssui/base-button/ui/two-step-button/ui/empty-state/ui/status-tag/ui/alert-banner/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.