Block 209 of 297
Room Booking
Meeting and study rooms with capacity, equipment, accessibility and cost, a book link each, and rules in a toggle.
- Puck key
- RoomBookingBlock
- Export
- roomBookingBlock
- React component
- <RoomBooking />
- Path
- components/puck/room-booking-block.tsx
- Dependencies
- None
- License
- MIT
About this block
When to use it, how to write for it, and what to change in the code.
What it's for
Library meeting and study rooms as photo cards listing branch, capacity, equipment, accessibility features and cost, each with its own booking button. Booking rules sit below in a collapsible panel so they don't crowd the cards. Cards run three across on desktop, two on tablets and one on phones, where the button stretches full width.
- A "Reserve a room" page for a library system
- A branch page listing that location's bookable spaces
- A community partners page explaining meeting room policy
Writing the content
- Enter Equipment one item per line; each line becomes its own list item.
- Leave Booking link blank for first-come rooms and the button disappears. Give each button a specific Button text, like "Book Study Room A", so a page of buttons is easy to tell apart.
- Write Image alt text that describes the room's layout and seating. Without an Image URL, a neutral illustration fills the space.
- Booking rules takes up to 12 numbered rules and the panel is hidden when there are none. Put the most-broken rule first.
Accessibility
- Each card is an article labeled by the room name, and capacity, equipment, accessibility and cost sit in a description list with hidden terms behind the icons (WCAG 1.3.1).
- The rules use native details and summary, so the panel opens with the keyboard and reports its expanded state (WCAG 2.1.1, 4.1.2).
- Booking buttons are at least 44px tall and the rules toggle 48px, both with a visible indigo focus ring (WCAG 2.4.7).
Customizing the code
- Change aspect-16/10 on the image and placeholder to alter the photo crop.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- Roomsarray
- Rules toggle texttext
- Booking rulesarray
- Contact linetext