A control for picking a value or range by dragging a thumb along a track.
disabledboolean |
false |
Whether the slider should ignore user interaction. |
form | string | – | Identifies the form that owns the slider inputs. Useful when the slider is rendered outside the form. |
format | NumberFormatOptions | – | Options to format the value. |
getAriaLabel | ((index: number) => string) | null | – | Returns the name of the thumb at an index. Give one to a range slider, so each thumb has its own name. A single-thumb slider takes its name from |
getAriaValueText | ((formattedValue: string, value: number, index: number) => string) | null | – | Returns the text a screen reader reads for a thumb's value, for example |
indicatorClassName | string | – | Classes for the filled part of the track. |
largeStep | number | 10 | The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down. |
locale | LocalesArgument | – | The locale used by |
max | number | 100 | The maximum allowed value of the slider. Should not be equal to min. |
min | number | 0 | The minimum allowed value of the slider. Should not be equal to max. |
minStepsBetweenValues | number | 0 | The minimum steps between values in a range slider. |
name | string | – | Identifies the field when a form is submitted. |
onValueChange | ((value: number | readonly number[], eventDetails: SliderRootChangeEventDetails) => void) | – | Callback function that is fired when the slider's value changed. Receives the new value as the first argument; the originating event is available as The
|
onValueCommitted | ((value: number | readonly number[], eventDetails: SliderRootCommitEventDetails) => void) | – | Callback function that is fired when a value change is committed. Does not fire if the value did not change, or if the change was canceled. **Warning**: This is a generic event, not a change event. The
|
orientation | "horizontal"|"vertical" | 'horizontal' | The component orientation. |
step | number | 1 | The granularity with which the slider can step through values. (A "discrete" slider.) The |
thumbAlignment | "center"|"edge"|"edge-client-only" | 'center' | How the thumb(s) are aligned relative to
|
thumbClassName | string | – | Classes for every thumb. |
thumbCollisionBehavior | "none"|"push"|"swap" | 'push' | Controls how thumbs behave when they collide during pointer interactions.
|
trackClassName | string | – | Classes for the track. |
value | number | readonly number[] | – | The value of the slider. For range sliders, provide an array with one value per thumb. |
variant | "default"|"expressive"|"classic"|"dotted"|"fader"|"segmented" | default | The visual style of the component. |
Accepts className, style and render, plus every native attribute of the element it renders.