Slider
Import
import { VKSlider } from "@vivakits/react-components";
Min Max
The maximum and minimum value the slider can slide to can be specified by the min
and max
props.
Value
The value
prop specifies the current value.
Step
The step
prop specifies the step factor to increment/decrement the value.
Color
The color
prop specifies the color of the slider thumb and active color.
Disabled
The disabled
prop specifies whether the component is interactable.
Callback
The action
prop specifies a callback function that is fired when the slider's value is changed.
Show Value
The showValue
prop specifies whether to show the value.
API Reference
Attribute | Type | Description | Default |
---|---|---|---|
min | number | Mininum boundary value. | - |
max | number | Maximum boundary value. | - |
value | number | Value of the component. | - |
color | primarysecondaryaccentsuccesswarningdangerdarklightHex value | Changes slider thumb and active color | primary |
action | function | Callback function that is fired when the slider's value is changed | - |
showValue | boolean | Whether to show the value. | true |
step | number | Step factor to increment/decrement the value. | 1 |
disabled | boolean | Specifies whether the component is interactable | false |