Meeting Room Booking
A meeting room booking block: selectable coworking room cards showing capacity, an equipment icon row, and an hourly rate, plus native start/end time inputs and an attendee stepper clamped to the selected room's capacity. The total cost is computed live from the time range in hours multiplied by the selected room's hourly rate.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/meeting-room-booking.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/booking/booking10.tsx instead.
Usage
The file also exports booking10Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Booking10, booking10Demo } from "@/components/blocks/booking/booking10"; export default function Page() { return <Booking10 {...booking10Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Book a meeting room" | Section heading. |
| description | string | "Pick a room, set your time, and see the cost update instantly." | Supporting copy under the heading. |
| rooms | Booking10Room[] | none | List of selectable meeting rooms. |
| className | string | none | Extra classes for the outer section element. |
Types
interface Booking10Room { id: string; name: string; capacity: number; hourlyRate: number; }
Behavior notes
- Selecting a room card is real single-select useState, with the selected card getting a primary ring and border.
- Equipment icons (Wifi/Tv/PenTool) are hardcoded per room by array index, not passed as demo data, since icon components can't cross the client/server boundary as props.
- The attendee stepper is real useState, clamped between 1 and the selected room's capacity.
- The total cost is computed live by splitting the start/end time state strings ("HH:MM") into minutes and doing simple arithmetic to get hours, then multiplying by the selected room's hourly rate. It shows a dash until a valid, positive time range and a room are both set.
- The 'Book room' button is decorative, no booking is actually submitted.
More Booking Blocks
View all →date-time-picker
Date & Time Picker
Split-panel scheduler: a real monthly calendar on the left, morning/afternoon time slots on the right, and a live booking summary footer.
reservation-summary
Reservation Summary
A static booking confirmation card with service, date/time, provider avatar, price breakdown, promo code field, and cancellation policy.
appointment-list
Appointment List
Upcoming and past appointments grouped by date, with provider avatar, status badge, and reschedule/cancel actions.
service-selector
Service Selector
Category-tabbed grid of bookable services with icon, description, duration, and price.
provider-picker
Provider Picker
A selectable grid of staff/provider cards with rating, reviews, availability, and an Any Provider fallback.
restaurant-reservation
Restaurant Reservation
Table reservation form with a guest stepper, date/time inputs, seating pills, and a live summary panel.