Skip to content
caliper ui pro docs

Rotary knob

A rotary control with a real edge. The knob is a short cylinder seen from above: a stack of discs gives it thickness, a ring of ticks lights up to the value, and the number is always written beside it. Drag it or use the keys; with detents on it clicks through every tenth.

Pro
42% gain

Drag around the knob, or use the arrow keys, Home and End.

When to use

  • Gain, volume, brightness and other controls that feel like a physical dial.
  • Settings where the number matters less than the feel of turning it.

When not to use

  • Precise entry; pair a slider with a number field.
  • Forms that need a native control for autofill or validation.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/rotary-knob

Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

RotaryKnob

18 props
PropTypeDefaultDescription
label *string—Accessible name of the control, such as "Gain".
valuenumber—Controlled when set. Whole numbers between `min` and `max`.
defaultValuenumber—
onValueChange((value: number) => void)—
minnumber0
maxnumber100
detentnumber10The step the knob clicks through while snapping is on. 0 turns detents off for good.
unitstring—Unit shown beside the number, such as "%".
valueText((value: number) => string)—The spoken value. Defaults to the number and the unit.
captionReactNode—The small text beside the number. Defaults to the unit and the label. Long text wraps.
resetValuenumber—Shows a Reset button that returns the knob to this value.
controlsbooleantrueThe Snap toggle and Reset button under the knob.
hintstring"Drag around the knob, or use the arrow keys, Home and End."
statusDepthStatus"ready"
messagesDepthMessages—
onRetry(() => void)—
disabledboolean—
classNamestring—

Keyboard

↑
Moves to the previous item or value.
→
Moves to the next item or value.
↓
Moves to the next item or value.
←
Moves to the previous item or value.
PageUp
Moves by a larger step, or to the previous page.
PageDown
Moves by a larger step, or to the next page.
Home
Jumps to the first item or the minimum.
End
Jumps to the last item or the maximum.

Accessibility

It exposes slider semantics, with aria-label, aria-valuemin, aria-valuemax, aria-valuenow, aria-valuetext and aria-describedby kept in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/rotary-knob.md

The index of every part is at /llms.txt.

More in Surfaces