Staaarter

Cinema Seat Picker

A cinema-style seat map: a curved screen indicator sits above a row/column seat grid with a visual aisle gap between blocks. Seats belong to a standard, premium, or vip tier with distinct styling, some are pre-marked occupied and unclickable, and the rest toggle in and out of a multi-select selection. A live summary panel lists the selected seat labels and a running total price, with a legend explaining every tier and state.

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 dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/cinema-seat-picker.json

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

Usage

The file also exports booking18Demo, 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 { Booking18, booking18Demo } from "@/components/blocks/booking/booking18";

export default function Page() {
  return <Booking18 {...booking18Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Choose your seats"Section heading above the seat map.
descriptionstringnoneShort subheading under the heading.
seatsSeat[]noneFull seat list with row, column, tier, and occupied flag.
tierPricesRecord<SeatTier, number>{ standard: 10, premium: 15, vip: 22 }Price charged per tier, used to compute the running total.
aisleAfterColnumber4Seat column after which the aisle gap renders.
currencySymbolstring"$"Symbol prefixed to every displayed price.
classNamestringnoneExtra classes for the outer section element.

Types

type SeatTier = "standard" | "premium" | "vip";

interface Seat {
  id: string;
  row: string;
  col: number;
  tier: SeatTier;
  occupied?: boolean;
}

Behavior notes

  • selectedSeats is a real useState<string[]> array; clicking any non-occupied seat toggles its id in and out of the array, and the running total price recomputes from the selected seats' tiers.
  • Occupied seats are rendered as disabled buttons with muted styling and are never clickable.
  • The screen bar and legend are purely decorative/informational and carry no state.