Lead: Liav Nadler
Status | ||||
---|---|---|---|---|
|
Table of Contents |
---|
Description
A slider is an input component, allowing Sliders allow users to select a value from a predefined range.
Usage & Behavior
General guidelines
A slider Sliders may appear in a formforms, a dialog dialogs, a filter panel or a widgetpanels, or widgets.
The set of values can be either discrete or continuous, depending on the number of values (see below).
Structure
A slider
...
consists of:
An axis, representing the range of values.
In most cases the axis will be horizontal, but it can also be vertical.
The left (or bottom) area of the axis will be colored, to indicate the selected value.
A handle, which a user can drag in order to select a value.
An Increase button at the right (or top) end of the slider. If the handle is already at the right (or top) end of the slider, the
increaseIncrease button will be disabled.
A Decrease button at the left (or bottom) end of the slider. If the handle is already at the left (or bottom) end of the slider, the
decreaseDecrease button will be disabled.
In case of a discrete set of values
:, a set of tick marks, with a fixed distance between them, indicating the possible values.
The slider may also include:
A set of values, ordered from minimum to maximum, for all or some of the values.
For numeric values
:, a supplemental text field
,allowing the user to view the selected value and to change it manually.
When dragging
:, a tooltip on top (or to the side) of the handle, showing the relevant value:
...
Default State
A slider must have a default value.
Content
In most cases, values will be numbers with a fixed increment between them (e.g. 1, 2, 3… or 5, 10, 15, 20…).
Alternatively, values can be textual (e.g. Poor, Fair, Average, Good, Excellent) or icon-based (e.g. sentiment indicators).
States
Focus management - TBD
State | Image | Comment |
---|---|---|
Normal | ||
Hover | ||
Active | ||
Disabled | ||
Focused | ||
Focused Hover | ||
Focused Active | ||
Focused Disabled |
...
Dragging the handle to the desired position (see Drag and Drop). In this case:
If ticks existsexist, the movement of the handle across the axis will be discrete, along the tick marks.
If no ticks exist, the movement will be continuous.
If a text field exists, the value will be updated automatically.
Clicking on the axis itself. In this case the handle will move to the selected position.
Clicking the increase Increase or decrease Decrease buttons. In this case:
The handle will move to the the next / previous position respectively.
If a text field exists, the value will be updated automatically.
Entering a value to in the text field, if one exists. In this case, the handle will automatically move to the relevant position on the axis after moving the focus away from the text field.
Hovering the slider will show the current value in a tooltip above (or to the side of) the selected value.
Validations and errors
The slider itself has no error state.
If a text field exists: , typing out of range values or illegal characters will show an error message. See Field Validation.
Best practices
Use a slider when:
Values have a distinct order.
There is a default value.
There are at least three possible values.
Don’t use:
If one or more of the conditions above is not met . In this case, consider using radio buttons or a dropdown menu→ use Radio Buttons or a Drop-Down Menu.
For selecting dates . Use → use a Date Picker / or Range Picker instead.
Range Slider
Basic range slider | |
Range slider with input fields |
A range slider is a variation variant of the slider, allowing users to select a range of values within the total range.
Usage & Behavior
The slider includes two handles, for the minimum and maximum values.
The selected area will appear of the axis between the two handles will be colored, to indicate the selected range.
The slider will not include increase the Increase and decrease Decrease buttons.
The slider may include:
Two input fields - : one for the minimum value and one for the maximum value.
A tooltip when dragging - one tooltip showing . One tooltip will show the entire range.
Dragging a handle will be limited by the other handle or by a minimum valid range.
Accessibility compliance
In the Focus state stated for a single range-handle slider:
Using the left and right arrows will move the handle accordingly.
If a supplemental supplementary text field exists, typing will enter/update the value.
Unless otherwise specified, see our general compliance information in Fundamentals - Accessibility.
Design
Zeplin link | Screen thumbnail |
---|---|
<<Short Zeplin link. You | <<Screen with 200 width>> |
...