SeatMapLegend
ImplementedTier legend for the seat map. One toggle button per price tier with a color swatch, name, formatted price, and (optionally) availability. Sibling organism to SeatMap (the chart surface) and SeatPicker (the capped checkout variant). Real organism; the molecules placeholder twin was de-cataloged. Implements the seat-map family i18n convention (see also SeatMap, SeatPicker) via the SeatMapLegendLocale type.
components/organisms/SeatMapLegend/SeatMapLegend.tsxTier legend for the seat map — colored swatches per tier with name, price, and availability count.
SeatMapLegend
design-system
Tier legend with one toggle button per price tier. Pair with SeatMap or SeatPicker.
Props
SeatMapLegend
tiersSeatTier[]—Price tiers to render, one legend chip each. SeatTier carries id, name, price, optional CSS color (rendered via inline style on the swatch — dynamic value, theme-aware fallback to var(--ep-teal)), optional available count (rendered visibly and in the tier aria-label), optional currency (ISO 4217 code; legacy dollar-sign maps to USD).
onSelectTier(tierId: string) => void—Called with the tier id when a legend chip is clicked. Selection state is a controlled pair with selectedTierId.
selectedTierIdstringtiers[0]?.idCurrently selected tier. When omitted the FIRST tier is treated as selected (aria-pressed=true) — pass explicitly to control.
ariaLabelstringSeat map legend / Légende du plan de salleAccessible name for the legend <ul>. Defaults to the locale-aware built-in; provide a custom string to override.
localeSeatMapLegendLocaleenLocalizes the built-in ariaLabel default, the availability template, and the empty state. Matches the SeatMap/SeatPicker family convention. Type re-exported from the barrel.
emptyLabelstringNo tiers configured / Aucun tarif configuréRendered inside a dashed-border <ul> when tiers is empty. Defaults to the locale-aware built-in; provide a custom string to override.
classNamestring—Appended to the root <ul> element.
idstringseatmap-legend-<useId()>Root element id (autogenerated when omitted).
<SeatMapLegend />Usage
Import
import { SeatMapLegend } from "@epasslive/design-system"Example 1
<SeatMapLegend tiers={tiers} onSelectTier={setTierId} selectedTierId={id} />Example 2
<SeatMapLegend tiers={tiers} onSelectTier={setTierId} locale=fr />Anti-patterns
— Don't reimplement tier legends inline — use this organism and the seat-map family i18n conventions (locale prop + barrel types).
— Don't import the underlying ul/button directly — pair with SeatMap instead of duplicating the per-tier toggle behavior.
— Don't use the tier color as the sole information channel — text name + price carry the non-color cue; color is a redundant visual cue, not the primary signal.