Staaarter

Restaurant Reservation

A restaurant reservation form: a +/- guest count stepper clamped between 1 and 12, native date and time inputs, three selectable seating preference pills (Indoor/Outdoor/Bar), and a special requests textarea. A summary panel on the side reflects the current guest count and seating choice live.

By Staaarter Team
Booking
Docs
Live preview

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/restaurant-reservation.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/booking/booking6.tsx instead.

Usage

The file also exports booking6Demo, 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 { Booking6, booking6Demo } from "@/components/blocks/booking/booking6";

export default function Page() {
  return <Booking6 {...booking6Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Reserve a table"Section heading.
restaurantNamestring"The Copper Fig"Name shown under the heading.
defaultGuestCountnumber2Initial guest count, clamped between 1 and 12.
defaultSeating"indoor" | "outdoor" | "bar""indoor"Initially selected seating preference.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • The guest count stepper is real useState, clamped between 1 and 12, and the +/- buttons disable at the bounds.
  • Seating preference is a real single-select state driving the pill button styling and the summary panel.
  • The summary panel's guest count and seating values are derived live from state, not static text.
  • The date input, time input, special-requests textarea, and 'Confirm reservation' button are decorative, no data is submitted anywhere.