Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Lead:  Liav Nadler

Status
colourYellow
titleongoing

...

A slider is an input component, allowing users to select a value from a predefined range

...

Image Added

Usage & Behavior

General guidelines

...

  • A slider contains:

    • 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 increase 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 decrease 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 rangevalues

    • For a numeric valuevalues: 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:

...

  • 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 on icons (for example, (e.g. sentiment indicators)

States

Focus management - TBD

State

Image

Comment

Normal

Image RemovedImage Added

Hover

Image RemovedImage Added

Active

Image RemovedImage Added

Disabled

Image RemovedImage Added

Focused

Image RemovedImage Added

Focused Hover

Image RemovedImage Added

Focused Active

Image RemovedImage Added

Focused Disabled

Image RemovedImage Added

Interaction

  • The user can select a value using one of three methods:

  1. Dragging the handle to the desired position (see Drag and Drop). In this case:

    1. If ticks exists, the movement of the handle across the axis will be discrete, along the tick marks

    2. If no ticks exist, the movement will be continuous

    3. If a text field exists, the value will be updated automatically

  2. Clicking the increase or decrease buttons. In this case:

    1. The handle will move to the the next / previous position respectively

    2. If a text field exists, the value will be updated automatically

  3. Entering a value to the text field, if exists. In this case, the handle will move to the relevant position on the axis after moving the focus

  • Mouseover Hovering the slider will show the current value in a tooltip on 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

  • TBD

Best practices

Use a slider when:

...

Range Slider

...

Image Added

A range slider is a variation of the slider, allowing users to select a range of values within the total range. In this case:

Usage & Behavior

  • The slider includes two handles. The selected area will appear between the handles

  • The slider will not include increase and 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 the range

  • Dragging a handle will be limited by the other handle

...