Dial

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-dial

About this component

A rotary knob like the one on a fan or an oven. The settings sit round its top arc with a tick each; choosing one (click, or the arrow keys) turns the ridged knob so its pointer swings to it with a mechanical overshoot. Real radios underneath. Pure CSS.

Triggers

  • Click
  • State change
  • Spring

Techniques

  • CSS variables
  • CSS transition
  • Conic gradient

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

Real native radios (visually hidden: absolute, 1x1, opacity 0) inside <label>s in a role="radiogroup" with an aria-label, so arrow keys, focus and screen readers work.

Reduced motion

The changes are instant.

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

More radios

See all
DieGet code
DrumGet code
FanGet code
Flip CardGet code