ComponentsProNew

Rotary Dial

A metal knob with six positions, like on old hardware. Real radio buttons inside, so arrow keys turn it too.

Customize

glowColor

Based on hungry-bat-66 by Pradeepsaranbishnoi (MIT license) · Terms of use

Props

8 properties
PropertyTypeDefaultDescription
optionsstring[]—Up to six positions clockwise from the top. Defaults to OFF and 1 to 5.
defaultValuenumber0Starting position index, from zero.
valuenumber—Controlled position. Without it the dial keeps its own.
onValueChange(index: number, option: string) => void—Called with the index and label of the new position.
sizenumber230Dial diameter in pixels.
glowColorstring"rgba(255, 255, 255, 0.85)"Color of the light under the pointer.
labelstring"Mode"Accessible name of the group.
classNamestring—Classes for the wrapper.

Dependencies

2 required packages

npm install clsx tailwind-merge

Related components

View all