Dial

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-dial

About this component

A dark device card with one big domed dial for winding down at night: press it and a warm amber glow blooms up inside the dome behind a crescent moon, a ring of tick lights sweeps round the bezel, and the glow keeps breathing slowly while it is on, with a small power light glowing beneath.

Triggers

  • Click
  • State change
  • Glow
  • Card

Techniques

  • CSS transition
  • Transition delay stagger
  • Radial gradient
  • Keyframes
  • CSS variables

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

The dial is a native <button> with role="switch", aria-checked and an aria-label ("Wind down"); :focus-visible outlines it in amber.

Reduced motion

The transitions and loops stop and the card jumps straight to its final state.

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

More cards

See all
FrostGet code
MarqueeGet code
PocketGet code
StampGet code