Metro

Destination
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-metro

About this component

A metro line with four stops. Picking a stop runs the line's colour out to it and slides the interchange ring along to sit on that station.

Triggers

  • Click
  • State change
  • Hover
  • Fill

Techniques

  • CSS variables
  • CSS transition
  • Transform only

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

Native radios in a fieldset with a visually hidden legend ("Destination"), each in a <label> whose visible text is the stop name; the line and ring are aria-hidden. :focus-visible outlines the whole option.

Reduced motion

The transitions are switched off.

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

More radios

See all
Drive mode
OutrunGet code
Paint
PansGet code
Pick gauge
PicksGet code
Station preset
PresetGet code