Seat

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-seat

About this component

A tiny cinema seat map. Taken seats are crossed out and skipped by the arrow keys; picking a free seat lifts it with a pop and lights it, and the ticket below rolls its seat code over to the new one, like a departures board.

Triggers

  • Click
  • State change
  • Spring

Techniques

  • CSS variables
  • Keyframes
  • Pseudo elements

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

Real native radios (visually hidden: absolute, 1x1, opacity 0) inside <label>s in a role="radiogroup" with an aria-label, so arrow keys, focus and screen readers work. Each radio is labelled "Row B, seat 3" ("taken" for disabled ones); the ticket is aria-hidden.

Reduced motion

The changes are instant.

Use it in anything you build, commercial and client work included. Licence

More radios

See all
ShapeGet code
SizesGet code
StarsGet code
Tab BarGet code