Drum

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-drum

About this component

An iOS-style picker wheel built on a real radio group. The options sit round a 3D drum that turns to bring the chosen one into the lit band; spin it with the mouse wheel, drag it up and down, click an option, or use the arrow keys. The edges fade away like the curve of a real drum.

Triggers

  • Click
  • State change
  • 3D

Techniques

  • preserve-3d
  • 3D transform
  • Perspective
  • CSS variables

Difficulty

Advanced

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
FanGet code
Flip CardGet code
FoldersGet code
LayoutGet code