Skip to content

No.53 · Controls

Detent Knob

A machined knob from good studio gear: drag round the rim or up and down, scroll, or use the keys; it clicks through detents with a tiny tick while a ring of 31 lights fills to the value and a small display reads it out. The light on the brushed metal stays put while the knurled body turns.

The prompt

Written for the variant you picked above: Studio

Build a rotary knob control (role="slider", focusable, aria-valuenow/min/max and valuetext like "62%") on a hardware panel. Look: a rounded panel with a soft top sheen. A 168px knob sits in a dark seat with a deep shadow. Its body — a knurled rim (repeating-conic-gradient teeth every 2°, masked to the outer 20%) and a glowing indicator line — rotates through 270° (−135° … +135°); its top face does not rotate, so the light stays still as the knob turns. Around it, 31 LED dots on the same 270° arc at radius 112px: dots up to the value glow (a gradient from the low to the high colour), the head dot is white-hot, the rest are dull sockets. Under it, an LCD readout with a small label and tabular mono digits with a glow. Min and max labels at the ends. Input: pointer down on the outer ring turns by angle (unwrapped atan2 deltas, 270° = the full range); near the centre, dragging up and down lifts it (220px = full range); pointer capture; touch-action none. Wheel ±1 step (Shift ×5) without scrolling the page. Keys: arrows ±step, PageUp/PageDown ±10%, Home/End. Double-click resets. Values snap to the step; each new step plays a 90ms scale(0.985) tick on the knob (WAAPI). Controlled or uncontrolled, with onChange. Reduced motion drops the transitions and the tick. Selected variant — Studio: theme="studio": a graphite panel on #0b0b0d, a brushed-aluminium top face (fine repeating-radial rings over a conic metal sheen), amber LEDs; label "Volume", default 62.

Notes

Interaction
Drag round the rim or up and down near the centre, scroll over it, or focus it and use the arrows, Page keys, Home and End. Double-click resets.
Motion
Body turns with a 90ms ease; a 90ms detent tick per step; LEDs fade in 120ms.
Accessibility
A real slider role with value text, a visible focus ring and the full keyboard set; the hint text describes the gestures.
Responsive
Fixed physical size (like hardware); the panel sits centred and fits a 320px screen.
On touch
Drag on the knob with a finger; touch-action none keeps the page from scrolling under it.

Featured

301 components