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 barWhen 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
| Prop | Type | Required | Description |
|---|---|---|---|
label | React.ReactNode | — | |
value | number | — | |
defaultValue | number | — | |
min | number | — | |
max | number | — | |
step | number | — | |
size | number | — | Knob diameter in px. Gearing, not diameter, controls precision. |
unit | React.ReactNode | — | |
pxPerStep | number | — | Vertical px of drag per step — the single most important feel knob. |
sweep | number | — | Arc sweep in degrees, centred on straight up. Default 270. |
formatValue | (v: number) => React.ReactNode | — | |
isDisabled | boolean | — | |
onChange | (v: number) => void | — | |
className | string | — |