OptionalchildrenThe slider's child components — typically <Rail>, <Handles>, <Tracks>, and <Ticks>.
OptionalclassCSS class name applied to the root element.
OptionalcomponentThe HTML or SVG tag name to use for the slider root element. Defaults to 'div'.
Use 'svg' together with flatten for SVG sliders.
OptionaldisabledWhen true, all mouse, touch, and keyboard interactions are suppressed.
OptionaldomainA two-element [min, max] tuple defining the numeric domain of the slider.
The min value must always be smaller than max regardless of the reversed prop.
OptionalflattenRenders the slider's child components as siblings of the root element rather than children.
Required for SVG sliders where nesting <div> inside <svg> is invalid.
OptionalmodeThe interaction mode controlling how multiple handles behave relative to each other.
| Mode | Behaviour |
|---|---|
1 |
Crossing – handles can move freely past each other |
2 |
Non-crossing – handles are blocked from crossing (default range behaviour) |
3 |
Pushable – dragging one handle pushes adjacent ones |
CustomMode |
Supply your own function for full control |
OptionalonCalled at the end of every slide interaction and on rail/track clicks. Receives the final committed array of values.
OptionalonCalled when a drag interaction ends (mouseup / touchend).
OptionalonCalled when a drag interaction begins (mousedown / touchstart on a handle).
OptionalonCalled continuously during a drag with the current (in-progress) values. This fires at high frequency — avoid expensive operations here.
OptionalreversedReverses the direction of the slider so that the minimum value is on the right (or bottom for vertical sliders).
OptionalrootAdditional props spread onto the root element (e.g. aria-label, data-testid).
OptionalrootInline styles applied to the root element.
Tip: at minimum, set position: 'relative' and a fixed height.
OptionalstepThe increment between discrete step positions.
Fractional steps (e.g. 0.5) are supported.
An array of initial (or controlled) handle values.
Values outside the domain are clamped to the nearest valid step.
OptionalverticalSet to true to render a vertical slider.
The slider will use its height instead of width for position calculations.
OptionalwarnWhen true, warns in the browser console if handle values are adjusted to fit the domain or step.
Props for the
<Slider>component.