Skip to main content
The Slider component allows users to select a value or range of values by dragging a thumb along a track. It supports both single value and range selection.

Basic usage

Props

number[]
The controlled value(s) of the slider.
number[]
The default value(s) for uncontrolled usage.
(value: number[]) => void
Callback fired when the value changes.
number
default:"0"
The minimum value of the slider.
number
default:"100"
The maximum value of the slider.
number
default:"1"
The step increment for value changes.
boolean
Whether the slider is disabled.
'single' | 'range'
default:"'single'"
The variant of the slider. Use ‘range’ for two thumbs.
string | [string, string]
Label(s) to display on the thumb(s). Use array for range variant.
'small' | 'large'
default:"'large'"
The size of the slider thumb.
string
Additional CSS classes to apply to the slider.

Single value slider

Range slider

With labels

With step

Thumb sizes

Disabled state

Price range example

Volume control example

Custom min/max range

With value display

Accessibility

  • Built on Base UI Slider primitive with full accessibility support.
  • Proper ARIA attributes including aria-label are automatically applied.
  • Supports keyboard navigation with arrow keys to adjust values.
  • The thumb has proper focus states and can be navigated via Tab key.
  • Labels are used as aria-label for each thumb to identify them to screen readers.
  • The slider uses edge alignment for accurate value representation.