shadcn.io is not affiliated with official shadcn/ui
Reservation FAQ Block for React
A FAQ for a wood-fired restaurant with a reservation widget in a card in card: a party size, six time-slot chips and a live line, "Table for 4 at 7:30 pm, 2 free", above six questions.
Installation
Overview
A reservation FAQ for React with Base UI. A start-aligned header gives the title, one sentence and the opening hours, and beside it a widget in a card in card: a party size from 1 to 8 with plus and minus buttons, six time-slot chips, a live line that says how many tables are free for that party at that time, and a Shine Button, "Request this table". Six questions in an accordion run rail to rail under it, each opened by a plus that becomes a minus, with a contact line at the foot. The rails and top rule come from the Guides spine, so the block lines up with its neighbours. It's built from Number Input, Toggle, Status, Accordion, Shine Button and Guides, with CSS transitions for the entrance and your theme's tokens for every colour. For restaurant, salon and clinic pages where the first question is "can I get a table on Friday?".
FAQ
Does the button book a table?
No. This block has no server: the button only answers with a polite note ("Request noted for 4 at 7:30 pm. We'll confirm by text.") and never says a table is booked. To make it real, replace the body of submit with a call to your booking system and show its answer in the same live line.
Where do the free-table numbers come from?
From SLOTS at the top of the file: each slot lists how many tables are free for a party of one or two, three or four, and five to eight. The live line, the disabled chips and the button all read the same numbers through one helper, so they never disagree. A slot with no table for the chosen party is disabled, struck through and read as "full" by a screen reader.
How does the party size work?
It's a Number Input from 1 to 8 with plus and minus buttons; you can also type, and anything out of range counts as the nearest allowed size. Changing it re-checks every slot at once, and clears a note that a request was sent. Larger groups are a question further down: they write to the team.
How does it work with a keyboard and a screen reader?
The widget is a form named "Reserve a table". The time chips are toggle buttons in a fieldset named "Time", and Tab moves between the party size, the chips and the button. The line under the chips is a polite live region, so each change and the final note are announced, and focus stays where you left it.
Related
- Pro
Split Calendar Booking Hero
Interactive demosA reverse split hero for a scheduling tool: a working booking page in a hairline frame with plus marks on its corners (step through weeks, pick a day and a time) beside a headline, a Shine Button and three ticks.
- Pro
FAQ with Contact Card
Contact and signupAn FAQ beside a contact card for an energy supplier: seven questions in an accordion, and behind a split divider a sticky card in card with email, live chat status, phone hours and a Shine Button.
- Pro
Accordion FAQ
Accordion listsA side-header FAQ for a web analytics tool: the title, one sentence and a contact prompt beside seven questions in an accordion, behind a split divider.
- Pro
FAQ with Call to Action
Contact and signupAn FAQ whose answers end in the next step, for a clinic scheduling tool: six accordion rows, each open answer closing with a button that fits it, the first one a Shine Button.
- Pro
Last Reviewed FAQ
Proof and freshnessA FAQ for a returns portal that shows how recently each answer was reviewed, with four dots and words in a mark column, and a switch to keep this quarter's.
- Pro
Procurement Pack FAQ
Calculators and toolsA FAQ for a data platform with a procurement pack beside the questions: three documents as checkboxes with a live count, an email field and one Shine Button that requests what is ticked.