Booking Page

The page people book a time on: open days in their zone, the times, a short form, Add to calendar, and reschedule and cancel.

December 2026

SunMonTueWedThuFriSat
Time zone

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/booking-page

Usage

import type { Outcome } from "./ui/uicontext/components/domain/Outcome.ts"import type { Availability } from "./ui/uicontext/components/schedule/Availability.ts"import { BookingDetails, BookingPage } from "./ui/uicontext/components/schedule/Booking.ts"
const Message = UiSchema.TaggedEnum({	RequestedBooking: { request: Schema.String, start: Schema.String, end: Schema.String, timeZone: Schema.String, details: BookingDetails },})// book on the server, then answer with `outcome`: Accepted shows the confirmation, Refused says whyexport const Book = (h: Html.H<typeof Message.Type>, availability: Availability, busy: ReadonlyArray<{ start: string; end: string }>, now: string, outcome: Outcome | null) =>	BookingPage(h, {		props: {			host: { id: "rosa", name: "Rosa Tanaka", email: "[email protected]" },			eventType: { id: "intro", title: "Intro call", durations: [30, 15], location: "Video call" },			availability,			busy,			now,			outcome,		},		onEmit: { RequestedBooking: ({ request, start, end, timeZone, details }) => Message.RequestedBooking({ request, start, end, timeZone, details }) },	})

Examples

Across a clock change

The weeks New York and London change their clocks on different days: the times move an hour and back.

March 2027

MonTueWedThuFriSatSun
Time zone

Cancel a booking

What a cancel link opens, before and after.

Cancel this booking?

What
Intro call with Maya Okafor
When
Thursday, December 10 · 3:00 – 3:30 PM

Maya sees this.

API reference

BookingPageComponent

Props

BookingPage props
NameTypeDescription
hostrequiredBookingHost—
eventTyperequiredBookingType—
availabilityrequiredAvailability—
busyrequiredSlot[]The host's busy times: ISO instants
nowrequiredstringThe app's current instant (ISO)
initialTimeZonestringThe visitor's zone as the page opens; the browser's when left out
outcomeOutcome | nullThe app's answer to the last RequestedBooking
rescheduling{ start, end, name, … }Moving this booking instead of making one: its times and who booked it
manage{ reschedule, cancel }Links the confirmation offers
localestring—

Events

BookingPage events
EventPayloadDescription
RequestedBooking{ request: string; start: string; end: string; duration: Int; timeZone: string; details: BookingDetails }Book this time: answer through outcome with the same request

BookingCancelComponent

Props

BookingCancel props
NameTypeDescription
hostrequiredBookingHost—
titlerequiredstring—
startrequiredstring—
endrequiredstring—
timeZonerequiredstringThe zone the visitor booked in
outcomeOutcome | nullThe answer to RequestedCancel
bookAgainstringWhere "Book another time" goes once it's cancelled
closedstringIt's already cancelled, or already over: say so instead of offering the button
localestring—

Events

BookingCancel events
EventPayloadDescription
RequestedCancel{ request: string; reason: string }—

Source