Skip to content
nexubDesign System
v11.9.0

Patterns · Pages

Booking

BookingPage

Booking in three steps: pick a date, pick a time, confirm. Side by side with room, one step at a time on a phone, with a hold countdown and a confirmed view.

Web

Live, at a real viewport width. Switch to Phone to see the responsive layout.

Usage

TSX
import { BookingPage } from '@nexub/patterns';

<BookingPage
  service={{ title: 'Intro call', duration: '30 minutes', price: 'Free' }}
  date={date}
  onDateChange={setDate}
  minDate={today}
  isDateDisabled={isWeekend}
  slots={slots}
  slotsLoading={isLoading}
  slot={slot}
  onSlotChange={setSlot}
  holdUntil={hold?.expiresAt}
  onHoldExpire={releaseHold}
  details={<NameField />}
  onConfirm={({ date, slot, formData }) => book(date, slot, formData)}
  confirmation={{ reference: booking?.reference, actions: <Button variant="tonal">Add to calendar</Button> }}
/>