Skip to content
Zuno UI
Explore components
EXPLORE
Actions
Forms
Layout
Navigation
Data display
Feedback
Overlays
RESOURCES
Components/Slider

Slider

Pick a value or a range by dragging or with the keyboard, with the value always readable.

Base UI reference ↗
Volume
40

Installation

Run it from the root of a project already set up with zunoui init.

npx zunoui@latest add slider

Dependencies

What add slider installs alongside the component. The CLI skips any you already have in a compatible version.

ZUNO registry

  • @zuno/utils

npm

Examples

3 examples · 1 component
slider
Volume
40

Label and value

SliderLabel names the thumb; SliderValue shows and announces the value.

slider
Price
$200 – $800

Price range

Two thumbs, each with its own name, formatted as currency.

slider
Opacity
50%
Bass (unavailable)
30

Steps and disabled

step="25" snaps to quarters; disabled blocks interaction.

API reference

Keeps the props, events and refs of the matching Base UI primitive, plus ZUNO's styles.

PropTypeDefault
value / defaultValue

An array renders one thumb per value (a range).

number | number[]—
onValueChange / onValueCommitted

While dragging, and once when released.

(value) => void—
min / max / step

Bounds and increment; Page Up/Down moves by largeStep.

number0 / 100 / 1
format / locale

How SliderValue and screen readers present the value (currency, percent…). locale defaults to en-US so SSR and the client agree.

Intl.NumberFormatOptions / string— / "en-US"
thumbLabels

One accessible name per thumb for ranges.

string[]—
orientation

Vertical sliders need a height (h-40 by default).

"horizontal" | "vertical""horizontal"
disabled

Dims the slider and blocks interaction.

booleanfalse
SliderLabel / SliderValue

Label wired to the thumbs, and the live formatted value.

div / output—

States

The states that apply to this component and their visual treatment.

StateTreatment
IdleTrack in muted, filled part and thumb ring in primary.
DraggingThe value and output follow the pointer.
FocusOffset outline on the focused thumb.
RangeTwo thumbs; they cannot cross.
DisabledDimmed with a not-allowed cursor.

Accessibility

Each thumb is a native range input: arrows change by step, Page Up/Down by a larger step, Home/End jump to the bounds.

SliderLabel names a single thumb; ranges need thumbLabels so each thumb says which end it controls.

SliderValue is an <output> and format shapes both what is shown and what is announced ("$250", not "250").

The control is 24px tall and the whole track is clickable, so small thumbs stay easy to reach.