Knob also Rotary, Dial, Potentiometer
A rotary control (a mixer's gain or pan, an effect's amount): drag up or down, the wheel or the arrow keys turn it, a double click puts it back; a log scale for frequencies, a bipolar arc for pan. Form-associated.
Input
EQ, mid band
Send
Drag up or down (Shift: finer), scroll, or focus and use the arrows; a double click puts a knob back.
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-knob> · RayKnob
Drag up or down to turn it (the whole sweep is 200px; hold Shift for ten times finer), or use the wheel. Keys: arrows step it (Shift: ten steps), Page Up/Down a tenth of the sweep, Home/End the ends. A double click returns to default-value. The dial is role=slider with the value's text (format, or the value and unit). Look: --ray-knob-size, --ray-knob-track, --ray-knob-arc, --ray-knob-body, --ray-knob-pointer, and the dial, track, arc, body and pointer parts.
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | number | Current value. The value attribute is the initial one (restored on reset). | |
min | min | number | 0 | Minimum. |
max | max | number | 100 | Maximum. |
step | step | number | 1 | Step; 0: continuous. |
defaultValue | default-value | number | What a double click returns to. Default: the value attribute; without one, min (the middle when bipolar). | |
scale | scale reflects | linear | log | linear | log: equal turns for equal ratios (20 Hz to 20 kHz); needs min above 0. The arrow keys then move a hundredth of the sweep. |
bipolar | bipolar reflects | boolean | The arc grows from 0 (from the middle when the range does not span 0): pan, a balance, a detune. | |
name | name | string | Form field name. | |
label | label | string | Visible label, above the dial (it names the slider). | |
description | description | string | Help text. | |
error | error | string | Error text. | |
disabled | disabled | boolean | Not interactive nor submitted. | |
color | color reflects | string | The arc's color. | |
size | size reflects | xs | sm | md | lg | xl | sm | The dial's size (28 to 72px; --ray-knob-size for any other). |
showValue | show-value reflects | boolean | Shows the value under the dial. | |
unit | unit | string | Appended to the value's text (" dB", " Hz", "%"). | |
format | — | function | The value's text, shown and spoken: (v) => v >= 1000 ? `${v / 1000} kHz` : `${v} Hz`. |
| Event | Description |
|---|---|
input | While it turns. |
change | When it settles: the end of a drag, a key, a pause of the wheel, a double click. |
| Part | Description |
|---|---|
dial | The dial (role=slider). |
track | The ring's track. |
arc | The arc of the value. |
body | The knob's body. |
pointer | The line that shows where it points. |
value | The value under the dial (show-value). |