Cluster
48km/h
74%
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initCardCluster(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/card-clusterAbout 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


