Skip to main content
Version: 57.2.0

Slider

Use the slider component to allow users to select a numeric value from a range by dragging a thumb along a track.

Package: @terreno/ui
Categories: Component
Props interface: SliderProps
Story source: demo/stories/Slider.stories.tsx

Live demo

Props

PropTypeRequiredDescription
onChangereflectionYesThe function to call when the slider value changes.
valuenumberYesThe current value of the slider.
disabledbooleanIf true, the slider will be disabled.
errorTextstring
helperTextstring
inlineLabelsbooleanIf true, displays min and max labels inline on both ends of the track.
labelsreflectionLabels to show below the slider track.
maximumTrackTintColorstringThe color of the track to the right of the thumb.
maximumValuenumberThe maximum value of the slider.
minimumTrackTintColorstringThe color of the track to the left of the thumb.
minimumValuenumberThe minimum value of the slider.
showSelectionbooleanIf true, the slider will show the current value as text.
stepnumberThe step value of the slider.
thumbTintColorstringThe color of the thumb.
titlestringThe title of the slider field.
useIconsbooleanIf true, icons will be displayed instead of numeric values when valueMapping is provided.
valueMappingarrayGraphics/icons to display instead of numeric values. Maps slider values to icon names or any string.