Skip to Content

Slider

Slider wraps a native range input with Windows 98 track, thumb, and optional tick marks.

Props

PropTypeDefaultDescription
value / defaultValuenumberminControlled or uncontrolled value.
onValueChange(value: number) => void-Value-level change callback for controlled usage.
min / max / stepinput range props0 / 100 / 1Range bounds and increments.
verticalbooleanfalseRenders a vertical slider.
boxIndicatorbooleanfalseUses the rectangular thumb variant.
ticksTickMark[]-Adds tick marks and accessible datalist options.

Examples

Range controls

0
50
100

ARIA

Slider keeps the native input type="range", so keyboard interaction follows browser range behavior.

Keyboard

Arrow keys adjust the value by the configured step. Home and End move to the minimum and maximum in browsers that support native range shortcuts.

SSR

Use the same controlled value on server and client, or prefer defaultValue for uncontrolled sliders.

Last updated on