An ink pill that morphs into a booking panel exactly as wide as its stage, with paged days and slots, arrows on both sides, swipe, and a scan before folding back into a pill that reads the booking.
pnpm dlx shadcn@latest add @beautiful-ui-pro/booking-morphNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import { BookingMorph, type BookingDay } from "@/components/ui/notchset/booking-morph";
const SLOTS = [120, 360, 600, 840, 1080, 1320]; // minutes from midnight, UTC
const days: BookingDay[] = ["SAT 03", "SUN 04", "MON 05", "TUE 06", "WED 07", "THU 08", "FRI 09", "SAT 10"].map((d, i) => {
const [weekday, date] = d.split(" ") as [string, string];
return { weekday, date, load: SLOTS.map((_, s) => Math.min(0.96, 0.2 + ((i * 7 + s * 13) % 10) / 12)) };
});
export function ReserveRunners({ reserve }: { reserve: (b: { day: number; slot: number; size: number }) => Promise<void> }) {
return <BookingMorph days={days} slots={SLOTS} sizes={[1000, 5000, 10000]} unitPrice={0.0007} onReserve={reserve} />;
}days–
{ weekday, date, load[] }[]Load 0–1 per slot; 0.9 or more is full.
slots / sizes / duration–
number[] / number[] / numberSlot starts (minutes), size options, slot length.
unitPrice / onReserve–
number / (b) => void | PromiseEstimate and booking; reject to stay open.
components/ui/notchset/booking-morph.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.