Transit

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-transit

About this component

A flight status card on black: two invented airport codes stand in a dot matrix of lit LEDs, a lime capsule carries a plane along the route and the times sit under the codes. Press the swap key and the codes flip the other way round dot by dot, column after column, the times trading places; drag the capsule's lit end or use the arrow keys and the plane moves along the flight while the hours left count down.

Triggers

  • Card
  • Glow
  • Neon
  • Click
  • State change
  • Mouse tracking

Techniques

  • CSS variables
  • CSS transition
  • Transition delay stagger
  • Event position
  • Radial gradient
  • SVG

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

The track is a role='slider' labelled Flight progress with aria-valuenow in percent and an aria-valuetext that reads the hours and minutes left or Landed; the swap key is a native button labelled Swap direction with aria-pressed; each code is a role='img' named with its letters.

Reduced motion

Reduced motion removes every transition, so swaps and drags are cuts.

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

More cards

See all

78 percent on Thursday

TubesGet code

102.6MHz

Soul

TunerGet code
WeighGet code
ZonesGet code