A Slider component allows users to select a value from a range by dragging a handle along a track.
The basic slider does not include discrete values, as the slider represents a percentage of 0-100
. In this case it is not necessary for a user to choose a specific value, but instead generally increase or decrease an input. For example, the user increases the slider amount and the volume of the music gets louder.
The more complex versions should be used for selecting a specific value within a value range.
The slider in its basic form should be accompanied by a label and a number input that doubles as a display for the slider’s current value.
Slider
component when users need to select a value from a continuous range, such as choosing a price range, setting volume, or adjusting brightness.↑
↓
arrow keys automatically updates the value in the text input and moves the slider handle to the corresponding value.Avoid using the Slider
component for selecting values from a discrete set, such as choosing from a list of predefined options. Instead, consider using a Select
or Radio Buttons
.
Avoid using it when the range of values is extremely large or unknown, as it may be difficult for users to navigate or select specific values accurately.
Do not use for ranges that are extremely large i.e. 1-1000
.
Do not use for ranges that are too small i.e. 1-3
.
Radio Buttons
, Checkboxes
, or a Select Menu
.Date Picker
or Time Picker
.