Slider
Examples
Intent colors of Slider component can be changed by providing custom values to primaryIntentColor
and secondaryIntentColor
props
API
Slider props
Name | Type | Default | Description |
---|---|---|---|
className | string | Enriched style to be provided to Slider Root | |
disabled | boolean | false | slider will be disabled |
getMarkLabel | function | Provide custom label for marks. | |
intent | 'default'| 'error'| 'warning'| 'success' | default | Intent of slider component |
markLabel | boolean | false | Displays text label on each steps. |
marks | boolean | false | Displays mark on each step. |
max | number | 100 | Maximum value for range of slider. |
min | number | 0 | Minimum value for range of slider. |
onChange | function | called when value changes | |
onFinalChange | function | called when user is done with changing | |
overrides | custom | Lets you customize all aspects of the component. | |
persistentThumb | boolean | false | Causes the value/thumb to always display. |
primaryIntentColor | string | custom primary intent color of the slider component | |
secondaryIntentColor | string | custom secondary intent color of the slider component | |
step | number | 1 | Step size |
style | function | Passes style function, object or string to the Slider Root. | |
value | array | Value for the slider component. | |
valueToLabel | function | Used to transform the thumb value/min/max labels into a user-friendly label. |
You can check the implementation of the component for more details.
Slider exports
You can import this module like so:
import {Slider} from 'spaceweb/slider'
It exports the following components or utility functions:
- Slider
- StatefulSlider
- StatefulSliderContainer