Skip to content
Calm motion: animations on this site only fade, with no movement

Seat picker ​

A map of seats in rows, with prices by zone

Lets a person choose seats for a show, a talk, or a live recording. Each seat shows its state: free, taken, or chosen. Its zone sets the price. For times in place of seats, use the slot picker.

Basic

2 seats · $50

  • rows is a list of rows, front first. Each row has a label and a list of seats. A null in the list is a gap, such as an aisle.
  • Each seat has an id, and an optional number, zone, and taken. With no number, the seat gets its place among the seats of its row, so a gap does not count.
  • zones gives each zone a label, a price, and an optional color. A free seat has an outline in the color of its zone. A chosen seat is filled with a check, and a taken seat is gray and crossed out.
  • v-model is the list of chosen seat ids. max sets the most seats in one order (default 0, no limit).
  • The line under the legend says how many seats are chosen and the total. currency and locale set the format of the money.
  • Each seat is a toggle button with a full name, such as "Row C, seat 5, Middle, $25". The map has one tab stop, and the arrow keys move between seats, over gaps and to the next row.
  • Change the words with labels or a label pack: stage, free, taken, chosen, and the functions seat and summary.

Usage ​

ts
import { BlessSeatPicker } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
rows*BlessSeatRow[]—
zonesBlessSeatZone[][]
maxnumber0the most seats in one order; 0 has no limit
currencystring"USD"
localestring"en"
labelsPartial<{ stage: string; free: string; taken: string; chosen: string; seat: (row: string, number: string, zone: string, price: string) => string; summary: (count: number, total: string) => string; }>—
modelValuestring[][]the ids of the chosen seats

Events

NamePayloadDescription
update:modelValue[value: string[]]

Released under the MIT License. Character names and artwork belong to their owners.