DocumentationDownloads and examples

Slider

The Slider is a component used for picking a value between a bound.

Slider Props

NameUseTypeDefinition
max
optional
numberMaximum bound for the slider.
min
optional
numberMinimum bound for the slider.
defaultValue
optional
DefProps | numberDefault value set before initialization, for a single slider it can be a number, and for a double slider it should be an object with the min and max values.
label
optional
{ left: string | number; right: string | number }Contains the left and right labels.
double
optional
booleanDetermines whether to render a double slider or not.
className
optional
stringSet different classes for SelectInput component
disabled
optional
booleanA boolean to disable the slider.
tooltip
optional
booleanIndicates whether to show a tooltip or not.
onChange
optional
(...values: any) => void A function that is called when the slider value changes. The function receives the new slider value(s).
tooltipText
optional
TTProps | string | number A string, a number or an object that defines the tooltip content. For a single slider it can be a string or a number, and for a double slider, it should be an object with the min and max values.
others
optional
anyReceives any additional props that are not defined by the component.

Examples

Single slider
Simple slider example with only label prop passed.
0100
Single slider with label, tooltip, min and max
Single slider example with with label, tooltip, min and max props passed.
0
3040
Disabled single slider
Disabled single slider example by adding disabled prop.
0
3040
Simple Double Slider
Simple double slider example by adding double prop.
Double Slider with label, tooltip, min and max
Complex double slider example by adding label, tooltip, min and max props.
3040
3040
Disabled double slider
Complex double slider example by adding disabled props.
3040
3040