Staaarter

Event Ticket Booking

An event ticket booking block: a wide banner image with the event name, date, and venue, followed by General/VIP/Backstage ticket tier cards each listing perks and its own +/- quantity stepper. An order total sums price times quantity across all tiers, updating live as quantities change.

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

npx shadcn add https://staaarter.com/r/event-ticket-booking.json

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

Usage

The file also exports booking9Demo, 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 { Booking9, booking9Demo } from "@/components/blocks/booking/booking9";

export default function Page() {
  return <Booking9 {...booking9Demo} />;
}

Props

PropTypeDefaultDescription
eventNamestring"Nightlight Music Festival"Event title shown under the banner.
eventDatestring"Sat, Oct 3 · 6:00 PM"Event date/time string.
eventVenuestring"Riverside Amphitheater"Event venue string.
image{ src: string; alt: string }noneBanner image for the MediaSlot.
tiersBooking9Tier[]noneTicket tiers with price and perks.
classNamestringnoneExtra classes for the outer section element.

Types

interface Booking9Tier {
  id: string;
  name: string;
  price: number;
  perks: string[];
  maxQuantity?: number;
}

Behavior notes

  • Each ticket tier has its own real quantity stepper, tracked in a single useState record keyed by tier id, clamped between 0 and the tier's maxQuantity (default 8).
  • The order total and ticket count are computed live from the quantity state and each tier's price.
  • The 'Checkout' button disables when no tickets are selected but does not submit anywhere, it's decorative beyond that disabled state.