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
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add seat-mapOr install the full npm package:
npm install bigbulluiUsage
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 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| venueName | string | Configures venue name. (Default: "GRAND AUDITORIUM") |
| eventName | string | Configures event name. (Default: "BIGBULL SYMPHONY · OPENING NIGHT") |
| eventDate | string | Configures event date. (Default: "SAT, OCT 24 · 20:00") |
| stageLabel | string | Configures stage label. (Default: "★ MAIN STAGE / ACOUSTIC PODIUM ★") |
| rows | string[] | Configures rows. (Default: DEFAULT_ROWS) |
| seatsPerRow | number | Configures seats per row. (Default: DEFAULT_SEATS_PER_ROW) |
| aisleAfterSeat | number | Configures aisle after seat. (Default: DEFAULT_AISLE_AFTER) |
| tiers | Record<string, SeatTier> | Configures tiers. (Default: DEFAULT_TIERS) |
| initialSoldSeats | string[] | Configures initial sold seats. (Default: DEFAULT_SOLD_SEATS) |
| initialAccessibleSeats | string[] | Configures initial accessible seats. (Default: DEFAULT_ACCESSIBLE_SEATS) |
| selectedSeatIds | string[] | Configures selected seat ids. |
| defaultSelectedSeatIds | string[] | Configures default selected seat ids. (Default: ["A-6"]) |
| maxSeats | number | Configures max seats. (Default: 8) |
| currency | string | Configures currency. (Default: "$") |
| serviceFeePerTicket | number | Configures service fee per ticket. (Default: 4.5) |
| onSelectionChange | (selectedSeats: SeatData[]) => void | Callback invoked on selection change. |
| onSeatClick | (seat: SeatData) => void | Callback invoked on seat click. |
| onCheckout | (selectedSeats: SeatData[], totalPrice: number) => void | Callback invoked on checkout. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |