Cluster

48km/h

74%

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-cluster

About this component

An EV speed cluster in dark glass, kept to one instrument: a thin arc with its numerals outside it, a lit needle and the speed set large at its centre. Hold or drag the slim throttle at the foot and the needle sweeps up with weight while the digits roll; let go and it coasts down as regen braking turns the arc green. Eco and Sport set the power and the colour of the light.

Triggers

  • Card
  • Glow
  • Mouse tracking
  • State change
  • Ambient
  • Continuous

Techniques

  • SVG
  • requestAnimationFrame
  • CSS variables
  • stroke-dashoffset
  • CSS transition
  • Event position

Difficulty

Advanced

Accessibility

Keyboard and screen readers

The throttle is a role slider labelled Throttle, hold to accelerate, with aria-valuenow as a percentage; ArrowRight or ArrowUp held down applies 70 percent throttle and releasing the key (or blurring) lets off. Eco and Sport are native buttons with role radio in a group named Drive mode. The speed and the charge carry aria-labels in words; the SVG is decorative.

Reduced motion

The colour, needle and pedal transitions are cut; the physics itself still runs because the moving needle is the reading.

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

More cards

See all

DecalGet code

Motion

DividersGet code
FlapGet code

Final reel

FolioGet code