Slider
Slider(
props):Element
A value picked along a track, filled in the menu’s accent up to the value.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
props |
{ className?: string; disabled?: boolean; label: string; max: number; min: number; onChange: (value) => void; onCommit?: (value) => void; step?: number; style?: SliderStyle; value: number; valueText?: string; } |
- |
props.className? |
string |
An override that shows in the diff. |
props.disabled? |
boolean |
Off: dimmed, and it takes no change. |
props.label |
string |
The accessible name. The slider draws no label of its own: the layout around it does. |
props.max |
number |
- |
props.min |
number |
- |
props.onChange |
(value) => void |
Called with each value the slider moves to. |
props.onCommit? |
(value) => void |
Called with the value where a drag or a key press ends, for a change worth making once, such as a save. |
props.step? |
number |
|
props.style? |
SliderStyle |
A style that comes from data, such as a track painted as a colour ramp through --slider-track. |
props.value |
number |
- |
props.valueText? |
string |
The value as a screen reader says it, such as “50 percent”. |
Returns
Section titled “Returns”Element