Slider
is the form slider control.
Basic usage of Slider component.
Properties | Description | Type | Default |
---|---|---|---|
min | The min value | number | 0 |
max | The max value | number | 100 |
step | The step distance, the value must be greater than 0 , and can be divisible by (max-min) . When marks is not null, the configuration of step is invalid | number | 1 |
disabled | Whether the control is disabled | boolean | false |
value | The current value | number | [number, number] | - |
range | Whether the control is a double sliders | boolean | false |
defaultValue | The default value | number | [number, number] | range ? [0, 0] : 0 |
onChange | Triggered when the slider is dragged, and the current dragged value is passed in as a parameter | (value: number | [number, number]) => void | - |
onAfterChange | Consistent with the trigger timing of touchend , pass the current value as a parameter | (value: number | [number, number]) => void | - |
icon | The icon of slider | ReactNode | - |
ticks | Whether to display the Ticks | boolean | false |
marks | The Marks of Ticks | {[key: number]: React.ReactNode} | - |