Slider also Range, Fader
A native range input (keyboard, touch and screen readers as usual) with label, value display and marks; horizontal or vertical (a fader), with a round thumb or a mixing desk's cap (and a fader's gestures), linear or on a fader's dB curve. Form-associated.
Adjust a photo
Steps and marks
Colors, sizes and states
Vertical: a graphic equalizer (-12 to +12 dB a band)
A console: fader caps (thumb="cap") on a desk's dB curve (taper="fader"). Drag a cap from where it is (Shift: finer), use the wheel, or double click for 0 dB
Your own thumb: the --ray-slider-thumb-* variables
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-slider> · RaySlider
| 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. |
name | name | string | Form field name. | |
label | label | string | Visible label. | |
description | description | string | Help text. | |
descriptionPosition | description-position reflects | above | below | above | The description before the control (help first) or after it, with the error (fields in a row stay aligned). |
error | error | string | Error text. | |
disabled | disabled | boolean | Not interactive nor submitted. | |
color | color reflects | string | Track and thumb color. | |
size | size reflects | xs | sm | md | lg | xl | sm | Track and thumb size. |
showValue | show-value reflects | boolean | Shows the value next to the label. | |
unit | unit | string | Appended to the shown value and its spoken text (%, px, ms…). | |
marks | — | array | Labeled ticks under the track. | |
orientation | orientation reflects | horizontal | vertical | horizontal | vertical: a fader, the minimum at the bottom and the marks before the track (on the left, aligned against it); its length is the host's height (--ray-slider-length, 12rem by default). The arrow keys work as on a horizontal one (ArrowUp raises it). |
thumb | thumb reflects | round | cap | round | The thumb: round, or cap (a mixing desk's fader cap: a short, wide block with a line at its middle, over a plain slot). A cap also plays as a fader: a click on the slot does not move it, a drag moves it from where it is (Shift: ten times finer), the wheel steps it (Shift: ten steps), and the arrow keys with Shift take ten steps. Any other look: the --ray-slider-thumb-size (across the track), -length (along it), -background, -border, -radius and -shadow variables. |
taper | taper reflects | linear | fader | linear | How the values spread along the track. fader: dB on a mixing desk's curve (the fourth root of the gain, min at the bottom), so the range used to mix gets most of the travel: with -60…6, 0 dB at 81 %, -12 at 52 %, -24 at 32 %. The marks follow it; ray-meter taper="fader" beside it lines up with them. A key or a wheel notch moves a hundredth of the travel (Shift: a tenth). The curve itself: taperPosition and taperValue from @raylang/elements/core. |
defaultValue | default-value | number | What a double click returns to (a fader's 0 dB). Without it, the value attribute. |
| Event | Description |
|---|---|
input | While dragging. |
change | When released. |
| Part | Description |
|---|---|
input | The native range input. |