Slider

Two variants: compact (spring-snapped thumb with track fill and range mode) and comfortable (pip-based discrete selector for settings panels).

Installation

Installs the Radix flavor. Switch in the right panel.

Compact

Inspect
25

Range

Inspect
2575

Steps

Inspect
50
50

Value Display

Inspect
Volume: 40
Volume: 60

Format

Inspect
Opacity: 75%

Disabled

Inspect
50

Comfortable

Inspect
Roundness2

Comfortable — Scrubber

Inspect
Volume
50%

Comfortable — Format

Inspect
QualityMedium

Comfortable — Disabled

Inspect
Roundness2

API Reference

Slider

PropTypeDefaultDescription
valuenumber | [number, number]Current value. Pass an array to enable range mode with two thumbs.
onChange(value: SliderValue) => voidCalled when the value changes via drag, click, or keyboard.
minnumber0Minimum value.
maxnumber100Maximum value.
stepnumber1Step increment. Thumb snaps to the nearest step during drag.
showStepsbooleanfalseRender dot indicators at each step position on the track.
showValuebooleantrueWhether to display the current value label.
valuePosition"left" | "right" | "top" | "bottom" | "tooltip""left"Position of the value label. "tooltip" shows above the thumb during interaction.
formatValue(v: number) => stringStringCustom formatter for the value label.
labelstringAccessible label for the slider, also shown as prefix in the value display.
disabledbooleanfalseDisables all interaction.

SliderComfortable

PropTypeDefaultDescription
valuenumberCurrent selected value.
onChange(value: number) => voidCalled when the value changes via click, drag, or keyboard.
minnumber0Minimum value.
maxnumber100Maximum value.
variant"pips" | "scrubber""pips"Visual mode. "pips" shows discrete dot indicators. "scrubber" shows no dots — drag anywhere in the row to set a continuous value.
stepnumber1Step increment for snapping. In pips mode, also determines the number of dots rendered.
labelstringLabel shown on the left side. Transitions from muted to foreground on hover.
formatValue(v: number) => stringStringCustom formatter for the value shown on the right.
disabledbooleanfalseDisables all interaction.