Booking Modal
A booking dialog: a strip of days, a grid of time slots with taken ones disabled, contact fields with validation and a confirmation screen. For tee times, consultations and reservations.
npx shadcn@latest add https://ui.develop-better-solutions.com/r/booking-modal.jsonDependencies:
lucide-reactUsage
booking-modal-example.tsx
"use client";
import { useState } from "react";
import { BookingModal } from "@dbs/ui";
export default function BookingModalExample() {
const [open, setOpen] = useState(false);
return (
<>
<button type="button" onClick={() => setOpen(true)} className="h-11 rounded-full bg-ink px-6 text-sm font-medium text-canvas">Book a tee time</button>
<BookingModal
open={open}
onOpenChange={setOpen}
eyebrow="Fairway Club"
title="Reserve your round"
description="Pick a day and a time. We hold it for you at the starter hut."
days={10}
closedWeekdays={[1]}
slots={["07:30", "08:00", "08:30", "09:00", "09:30", "10:00", "10:30", "11:00"]}
isUnavailable={(d, s) => (d.endsWith("3") && s < "09:00") || s === "08:30"}
/>
</>
);
}