Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, media-slot dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/table-reservation-form.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/food/food15.tsx instead.
Usage
The file also exports food15Demo, 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 { Food15, food15Demo } from "@/components/blocks/food/food15"; export default function Page() { return <Food15 {...food15Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | ReactNode | "Reserve a table" | Section heading. |
| description | string | none | Section intro text below the heading. |
| image | { src: string; alt: string } | none | Restaurant photo; falls back to a placeholder when omitted. |
| timeSlots | string[] | ["17:00", "17:30", ..., "20:30"] | Selectable time-slot pills, rendered in order. |
| maxGuests | number | 8 | Upper bound the guest-count stepper can be incremented to. |
| submitLabel | string | "Request reservation" | Label on the (decorative) submit button. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- Date, time slot, and guest count are real client state (useState): the native date input is controlled, exactly one time-slot pill can be selected at a time (aria-pressed reflects the active pill), and the guest-count stepper is clamped between 1 and maxGuests.
- There is no Select/Checkbox primitive in this repo's UI kit, so the time slots are hand-written toggle buttons rather than a native <select>.
- Name, phone, email, and special-request fields are plain uncontrolled inputs with no validation.
- The submit button is decorative and inert: there is no real reservations backend wired up, so it has no onClick/form submit handler, matching every other booking CTA in this category.
More Food Blocks
View all →Loyalty Rewards Program
Four-tier rewards program with points earning steps, benefit lists, and app store download buttons.
Gift Card Shop
Gift card purchase interface with preset amounts, custom input, digital/physical delivery options, and live preview.
Online Ordering Hub
Delivery platform cards with logos, fees, and delivery times alongside pickup info with address and phone.
Expandable Menu Accordion
Collapsible menu items revealing full images, calorie counts, protein info, and allergen badges.
Daily Specials Chalkboard
Dark-themed chalkboard-style menu with decorative corners, day labels, and timestamp.
Dietary Filter Menu
Interactive menu with dietary filter buttons (vegetarian, vegan, gluten-free) and allergen warnings.