A slider allows a user to select one or more values within a range.
orientation
step
minValue
maxValue
isDisabled
1<aC />1<Slider />npm install @rootui/slider1import { slider } from "@rootui/slider";
2
3export default function Page() {
4 return (
5 <Slider />
6 )
7}See the React Aria documentation for more information.
Prop | Type | Default |
|---|---|---|
| | |
The orientation of the Slider. | ||
| | |
The slider's minimum value. | ||
| | |
The slider's maximum value. | ||
| | |
The slider's step value. | ||
| | |
The content to be rendered inside the slider thumb. | ||
| | |
Props for the slider thumb component. | ||
| | |
The content to be rendered inside the slider thumb. | ||
| | |
Whether to show a tooltip with the current value when hovering or dragging the thumb. | ||
| | |
Props for the tooltip that appears when hovering or dragging the thumb. Visit https://number-flow.barvian.me/ for more information on the NumberFlow component. | ||
| | |
Whether the slider is disabled. | ||
| | |
The current value (controlled). | ||
| | |
The default value (uncontrolled). | ||
| | |
Handler that is called when the value changes. | ||
| | |
Fired when the slider stops moving, due to being let go. | ||
| | |
The display format of the value label. | ||
Attribute | Description |
|---|---|
| The orientation of the slider. |
| Whether the slider is disabled. |