Componentticket-stub3.82 KB gzipZero dependencies

Seat Map

Interactive arena seating chart matrix grid with row letters, seat numbers, tier types, and price calculator.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add seat-map

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { SeatMap } from "@/components/ui/seat-map"; <SeatMap venueName="BIGBULL AMPHITHEATER" maxSeats={6} onSelectionChange={(seats) => console.log(seats)} />

Source code

seat-map.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxseat-map.tsx558 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type SeatTierType = "vip" | "orchestra" | "balcony" | "sold" | "accessible"; export interface SeatTier {  id: SeatTierType | string;  name: string;  price: number;  badgeClass?: string;  description?: string;} export interface SeatData {  id: string; // e.g. "A-1"  row: string; // e.g. "A"

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { SeatMap } from "@/components/ui/seat-map"; <SeatMap />
PropTypeDescription
venueNamestringConfigures venue name. (Default: "GRAND AUDITORIUM")
eventNamestringConfigures event name. (Default: "BIGBULL SYMPHONY · OPENING NIGHT")
eventDatestringConfigures event date. (Default: "SAT, OCT 24 · 20:00")
stageLabelstringConfigures stage label. (Default: "★ MAIN STAGE / ACOUSTIC PODIUM ★")
rowsstring[]Configures rows. (Default: DEFAULT_ROWS)
seatsPerRownumberConfigures seats per row. (Default: DEFAULT_SEATS_PER_ROW)
aisleAfterSeatnumberConfigures aisle after seat. (Default: DEFAULT_AISLE_AFTER)
tiersRecord<string, SeatTier>Configures tiers. (Default: DEFAULT_TIERS)
initialSoldSeatsstring[]Configures initial sold seats. (Default: DEFAULT_SOLD_SEATS)
initialAccessibleSeatsstring[]Configures initial accessible seats. (Default: DEFAULT_ACCESSIBLE_SEATS)
selectedSeatIdsstring[]Configures selected seat ids.
defaultSelectedSeatIdsstring[]Configures default selected seat ids. (Default: ["A-6"])
maxSeatsnumberConfigures max seats. (Default: 8)
currencystringConfigures currency. (Default: "$")
serviceFeePerTicketnumberConfigures service fee per ticket. (Default: 4.5)
onSelectionChange(selectedSeats: SeatData[]) => voidCallback invoked on selection change.
onSeatClick(seat: SeatData) => voidCallback invoked on seat click.
onCheckout(selectedSeats: SeatData[], totalPrice: number) => voidCallback invoked on checkout.
classNamestringOptional Tailwind or custom CSS classes merged with component styles.