terra vidhal

Seat Picker

Component

About

An interactive seat picker with a tiered seat map, tier highlighting, sold and held states, arrow-key navigation across rows, a seat limit, removable selection chips, a live hold countdown, animated subtotal, service fee and total, and a reservation confirmation with reference.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Seat Picker to your project and fits it to your theme.

Code

How Seat Picker is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

/**
 * PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
 */

import {
  SeatPicker,
  type SeatRow,
  type SeatStatus,
  type SeatTier,
} from "@/components/ui/seat-picker";

const TIERS: SeatTier[] = [
  { id: "floor", label: "Floor", price: 45, tone: "sky" },
  { id: "lower", label: "Lower", price: 79, tone: "violet" },
  { id: "mezzanine", label: "Mezzanine", price: 119, tone: "amber" },
  { id: "box", label: "Box", price: 165, tone: "emerald" },
];

function makeRow(
  row: string,
  count: number,
  tierId: string,
  options: { sold?: number[]; held?: number[] } = {},
): SeatRow {
  const sold = new Set(options.sold ?? []);
  const held = new Set(options.held ?? []);
  return {
    row,
    seats: Array.from({ length: count }, (_, index) => {
      const number = index + 1;
      const status: SeatStatus = sold.has(number)
        ? "sold"
        : held.has(number)
          ? "held"
          : "available";
      return {
        id: `${row}${number}`,
        number,
        tierId,
        status,
      };
    }),
  };
}

const ROWS: SeatRow[] = [
  makeRow("A", 10, "floor", { sold: [4, 9], held: [7] }),
  makeRow("B", 10, "floor", { sold: [2], held: [10] }),
  makeRow("C", 12, "lower", { sold: [5, 6], held: [11] }),
  makeRow("D", 12, "lower", { sold: [1] }),
  makeRow("E", 8, "mezzanine", { sold: [3] }),
  makeRow("F", 6, "box", { held: [2] }),
];

export default function SeatPickerDemo() {
  return (
    <main className="flex min-h-screen w-full items-center justify-center bg-background px-4 py-12 sm:px-6">
      <SeatPicker
        tiers={TIERS}
        rows={ROWS}
        title="Reserve seats"
        description="An evening of short films and a live score. Choose your seats, compare the tiers and hold them while you decide."
        maxSeats={6}
        serviceFeePercent={12}
      />
    </main>
  );
}

Dependencies

More by terra vidhal

View all
  • Gravity Stars Background

    Gravity Stars Background

    16
  • Audio Waveform

    Audio Waveform

    13
  • Topographic Lines

    Topographic Lines

    12
  • Notification Center

    Notification Center

    11
  • Booking Calendar

    Booking Calendar

    11
  • Spotlight Card

    Spotlight Card

    11
  • Command Palette

    Command Palette

    9
  • Kpi Counter

    Kpi Counter

    9

Explore more

Part of PrequelUI Animate — browse the full library on 21st.dev.