Skip to main content

Dial

A rotary knob for a bounded continuous value. Drag is vertical, not rotational.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When to use​

A rotary knob for a bounded continuous value.

Accessibility​

Fully keyboard operable: Tab to focus, Enter/Space to activate. The visible focus ring uses --focus-ring — never remove it. Provide an accessible label (aria-label) for icon-only controls.

Install and import​

npx shadcn@latest add @prism/dial
import { Dial } from '@/components/prism/Dial';

In a no-build prototype, read it from the bundle instead: const { Dial } = window.PrismDesignSystem_39d121;

Props​

PropTypeRequiredDescription
labelReact.ReactNode—
valuenumber—
defaultValuenumber—
minnumber—
maxnumber—
stepnumber—
sizenumber—Knob diameter in px. Gearing, not diameter, controls precision.
unitReact.ReactNode—
pxPerStepnumber—Vertical px of drag per step — the single most important feel knob.
sweepnumber—Arc sweep in degrees, centred on straight up. Default 270.
formatValue(v: number) => React.ReactNode—
isDisabledboolean—
onChange(v: number) => void—
classNamestring—