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.

Source on GitHub

Adjust a photo
Reset
Steps and marks
Colors, sizes and states
Vertical: a graphic equalizer (-12 to +12 dB a band)
Flat
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
0.0 dBVocals
-4.5 dBGuitar
-9.0 dBBass
-2.0 dBDrums
Your own thumb: the --ray-slider-thumb-* variables
Code

API

For AI agents: this API as Markdown, or every component in llms-full.txt.

<ray-slider> · RaySlider

PropertyAttributeTypeDefaultDescription
valuevaluenumberCurrent value. The value attribute is the initial one (restored on reset).
minminnumber0Minimum.
maxmaxnumber100Maximum.
stepstepnumber1Step.
namenamestringForm field name.
labellabelstringVisible label.
descriptiondescriptionstringHelp text.
descriptionPositiondescription-position reflectsabove | belowaboveThe description before the control (help first) or after it, with the error (fields in a row stay aligned).
errorerrorstringError text.
disableddisabledbooleanNot interactive nor submitted.
colorcolor reflectsstringTrack and thumb color.
sizesize reflectsxs | sm | md | lg | xlsmTrack and thumb size.
showValueshow-value reflectsbooleanShows the value next to the label.
unitunitstringAppended to the shown value and its spoken text (%, px, ms…).
marks—arrayLabeled ticks under the track.
orientationorientation reflectshorizontal | verticalhorizontalvertical: 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).
thumbthumb reflectsround | caproundThe 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.
tapertaper reflectslinear | faderlinearHow 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.
defaultValuedefault-valuenumberWhat a double click returns to (a fader's 0 dB). Without it, the value attribute.
EventDescription
inputWhile dragging.
changeWhen released.
PartDescription
inputThe native range input.