Slider

Continuous values chosen by feel, with exact entry as backup.

v1.0.0·Updated Jul 8, 2026 · 10:45
Live Demo — Fully Interactive
Drag, or use ← → — the fill follows
64%
Configuration
Readout
Size
Step
State
60
<Slider value={60} min={0} max={100} showValue />
Behavior — The Engineering Contract
Prop / eventTypeNotes
value / onChangenumber / (v) => voidCurrent value; controlled
min / max / stepnumberRange and snapping increment
showValue / showInputbooleanRight-aligned readout, or an exact number field
ticksbooleanLabelled marks under the track
onChangeCommitted(v) => voidFires on release — use for network writes
← / → · Home / EndStep by one; jump to min / max

Use a Slider for a value chosen by feel within a known range. When exact values matter more than feel, lead with a number Input.

Anatomy
1FillWarm track from min to the current value.
2ThumbWarm grip with a page-colour cutout and ring.
3TrackUnfilled remainder, 4px, fully rounded.
Do's and Don'ts
✓ Do
70%

Show the current value beside the track so the choice is legible.

✕ Don't

Don't hide the value when the exact number matters. Guessing is not feel.

✓ Do
020406080100

Snap to steps with ticks when only certain values are valid.

✕ Don't
Precise to the cent

Don't use a coarse slider for values needing precision. Give a number field.

In context: Examples
A · Volume
64%

Media and audio levels, adjusted by feel with a live readout.

B · Price filter

Budget filters pair the track with an exact number entry.

C · Zoom
50%75%100%125%150%

Stepped zoom levels where only set values make sense.

Measurements & Tokens
TokenValueRole
--sld-track-h4pxTrack thickness
--sld-thumb16pxThumb diameter
--sld-fill#FF7A00Filled track and thumb
--sld-track#242428Unfilled remainder
--sld-cutout3px page bgRing inside the thumb
--sld-focusrgba(255,122,0,.3)4px focus halo
Code
<label class="o-slider">
  <input type="range" class="o-range" min="0" max="100" value="64"
         style="--pct:64%" aria-label="Volume" />
  <span class="o-slider__val">64%</span>
</label>