Magoo Component UI logo Magoo Component UI
← Catalog

Seat Map

seat-map organism experimental

A selectable aircraft seat grid with available/selected/taken states.

Also in: Forms

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Available Selected Taken
12
13
14
15
16
17
18
19
20

Select up to 3 seats

Props

NameTypeReq
max_choices integer
rows array ✓

How to use

The seat grid is interactive via behavior.js — no props needed to enable it. Each seat is a real button; clicking an available seat selects it (fills with the primary colour) and clicking a selected seat deselects it. Taken and aisle seats are inert. Set `max_choices` to the maximum number of seats a user may hold at once (omit or 0 for no limit). Once that many are selected, clicking another available seat is blocked — the user must deselect one first — and a `seat:max` event fires. A live "N of MAX seats selected" counter is shown in `.seat-map__status` (its initial static text is "Select up to N seats"). Note the caller's pre-selected seats count toward the limit. Listen on the component root (events bubble): - `seat:select` / `seat:deselect` — `event.detail = { seat }` (e.g. "13A"). - `seat:max` — `event.detail = { max }`, fired when a pick is rejected by the limit; use it to prompt the user (e.g. "You can only pick 3 seats").

Use cases

form WCAG AA SEO 25 dir: both ai-generated