Skip to content
GitHub

Slider

A slider for selecting a value from a range.

Installation

Usage

Controlled

Control the value with value and onValueChange for a controlled slider.

Greater than 80

40

Examples

With label and value

Use <Field>, <SliderLabel>, and <SliderValue> for accessible labelling and to show the current value.

50

Range

Use an array with two values for a range slider.

Vertical

Use orientation="vertical" for a vertical slider.

Disabled

Use the disabled prop to disable the slider.

Min and max

Set min and max to constrain the slider's value range.

50

Marks

The showMarkers and markerInterval props display markers and control the interval between them.

Step

Set step to control the slider's granularity.

Use with showMarkers and markerLabels to show custom labels on the markers.

Marks are only supported for horizontal sliders.

API Reference

Slider

Root component. Manages value, track, range, and thumb(s).

SliderLabel

Label for the slider. Required for accessibility.

SliderValue

Shows the current value. Useful for numeric display or formatting.


For a complete list of props, see the Ark UI documentation.