Sliders in Interact products

It is completed in Dec 2021. As a member of the Interact design system team, I created the spec for sliders. This would be the standard behavior for the sliders in Interact products, guidelines for designers, as well as developers.

Background

There were sliders in the component library but no guidelines. Both designers and developers were asking about the detailed behaviors of these sliders, especially those with double knobs. Almost no one knows how they are used in the current products.

Developers had more questions coming when they started the implementation. Can user click/tap the slider itself? In double knob sliders, can one be moved across the other? If yes, how do the corresponding values change? How do we deal with errors when it is used with the input field? How is the unit displayed in the input field? What if the two knobs are super close to each other? etc

Desk research, interview and discussion

I started from desk research while I doubted some points in the articles. So I interviewed some people and discussed the details with other designers.

It was surprising that people rarely clearly realized that double sliders are used for range selection. When they were asked what the double sliders did, they were confused about the two knobs. But most of them claimed that they know how to use them when they see them in the actual UI / real scenarios. As a consequence, we documented a rule that “range” should be directly written / pointed out in the label when a double knob slider is applied.

Slider spec is also surprisingly rich with interesting details. One detail that has been documented is that users should be able to control the slider when they keep pressing down on the whole UI on touch devices. See the demo in the spec.

Because installers and configurators, our main users, use Interact mobile apps in the field to configure the lights. They are usually males with big figures. The places where they are using our app and their characteristics make me feel that those details are crucial to our products. Documenting them is going to not only keep the consistent behavior, look and feel across all Interact products at the component level, but also ensure the usability. The point of view was also validated by a researcher/designer from Interact team, she found that the sliders were hard to be controlled by our users when they were lack of these details.

Summary

All guidelines of the components in the Interact library follow the same structure.

  • Types: slider types
  • Anatomy: key elements explanation in different types of sliders
  • Usage: how the sliders are used in Interact products
  • Behavior: how the sliders behave in details

Below is the spec.

Sliders

A slider is a control element that uses a knob or lever, moved usually horizontally to control a value, such as brightness, color temperature in Interact context.

It works best when the precise value does not matter to the users, and they are encouraged to explore the possibilities in the given range.

Types 

There are 2 dimensions to group the sliders, single or double knobs, continuous or discrete value options. As a result, there are 4 types of sliders, single continuous sliders, single discrete sliders, double continuous sliders, and double discrete sliders.

general types of sliders
4 types of sliders
Single continuous sliders

Single continuous sliders is used to choose a single value from a range of sequential values.

It contains one knob and a track. It is the most common and frequently-used one in the Interact context for controlling the brightness of the lights.

single continuous sliders
Single continuous slider
Single discrete sliders

Single discrete sliders are used to choose a single value from a fixed set of predefined options. These options are marked on the track.

It contains one knob and a track with tick marks, which indicates the predefined values that users could snap to.

single discrete sliders
Single discrete slider
Double continuous sliders

Double continuous sliders, known as dual-point continuous sliders, is used to select the range of the results from sequential values.

It contains two knobs and a track. The two knobs indicate the lower and upper boundaries of the range respectively.

double continuous sliders
Double continuous slider
Double discrete sliders

Double discrete sliders, known as dual-point discrete sliders, is used to select the range of the results from a fixed set of predefined options. These options are marked on the track.

It contains two knobs and a track with tick marks. The two knobs indicate the lower and upper boundaries of the predefined value set, which means the minimum and maximum values that users are able to select both come from the given options.

double discrete sliders
Double discrete sliders
Anatomy 
Single continuous sliders
  1. Track: The container of a range of sequential values, the sliding range of the knob. The wider or the denser the range selectable through a slider, the harder it is to select a precise value.
  2. Knob/Thumb/Handle/Elevator: The lever of the slider, navigating to the selected value and its position on the track
  3. Label/Icons: At least there should be one of them, indicating what the slider is about. There could be different combinations between the icon and the slider, depending on the needs, layout, spacing and whether an input field is provided or not.
  4. Value/Descriptive labels (optional): Clearly displaying the selected value to the users. In order to remain visible during use, it must appear beside or above the knob and the thumb of the user, especially in the context of touch hybrid devices.
single continuous sliders with num
Single continuous slider – Key elements
Single discrete sliders
  1. Track: The container of the predefined option set, the container of tick marks, the sliding range of the knob. 
  2. Knob/Thumb/Handle/Elevator: The lever of the slider, navigating to the selected value and its position on the track.
  3. Label/Icons: At least there should be one of them, indicating what the slider is about.
  4. Tick marks/Range label: The indicators for the positions of the predefined values on the track, notating where the selected value is going to snap to. The reference horizontal spacing between critical tick marks would be at least 64 dips for easier positioning.
  5. Value/Descriptive labels (optional): Clearly displaying the selected value to the users. In order to remain visible during use, it must appear beside or above the knob and the thumb of the user, especially in the context of touch hybrid devices.
single discrete sliders with num
Single discrete slider – Key elements
Double continuous sliders
  1. Track: The container of a range of sequential values, the sliding range of the knobs. The wider or the denser the range selectable through a slider, the harder it is to select a precise value.
  2. Knob/Thumb/Handle/Elevator: The lever of the slider, positioning the minimum and maximum value on the track.
  3. Label/Icons: At least there should be a label, saying it’s a range selector and what it is about. There could be different combinations depending on the needs, layout, spacing, how the range is displayed, whether input fields are provided or not, etc.
  4. Value/Descriptive labels (optional): Clearly displaying the selected range to the users. In order to remain visible during use, they must appear beside or above the knob and the thumb of the user, especially in the context of touch hybrid devices.
double continuous sliders with num
Double continuous slider – Key elements
Double discrete sliders
  1. Track: The container of the predefined option set, the container of tick marks, the sliding range of the knobs. 
  2. Knob/Thumb/Handle/Elevator: The lever of the slider, positioning the minimum and maximum value on the track.
  3. Label/Icons: At least there should be a label one of them, saying it’s a range selector and what it is about. There could be different combinations depending on the needs, layout, spacing, how the range is displayed, whether input fields are provided or not, etc.
  4. Tick marks/Range label: The indicators for the positions of the predefined values on the track, notating where the values are going to snap to. The reference horizontal spacing between critical tick marks would be at least 64dips for easier positioning.
  5. Value/Descriptive labels (optional): Clearly displaying the selected range to the users. In order to remain visible during use, they must appear beside or above the knob and the thumb of the user, especially in the context of touch hybrid devices.
double discrete sliders with num
Double discrete sliders – Key elements
Usage 

It is recommended to use sliders when you would like to encourage more explorations on the values within the range, and the specific value does not matter to the users.

In Interact context, they’re ideal for adjusting settings such as light brightness, color temperature, and other detailed parameters in lights and sensors.

General

Use single sliders to select a value; use double sliders to select a range.

usage types of sliders 02
Dimension 1 – Numbers of knobs, one knob or two

Use continuous sliders to provide all value options; use discrete sliders to provide predefined value options.

usage types of sliders 01
Dimension 2 – Having tick marks or not, continuous or discrete
Single continuous sliders

They are used when only one value has to be selected. And the options are consecutive. They are the most common and frequently-used sliders.

single continuous slider usage - in interact pro 01
single continuous slider usage - in interact pro 02
Single continuous slider – Light brightness and color temperature control in Interact Pro
single continuous slider usage - in outdoor sensor bundle app
Single continuous slider – Sensor tilt and impact control in Outdoor Sensor Bundle
single continuous slider usage - in interact city
Single continuous slider – Meter tolerance control in Interact City
Single discrete sliders

They are used when only one value has to be selected. The options are limited from a fixed predefined set. Users can only choose a value from the set. The single discrete sliders could be replaced with a set of radio buttons or a dropdown list.

single discrete slider usage - text size
Single discrete slider – Font size change

When more information for the tick marks are necessities, we could space out them vertically and add a subtle vertical line indicating a connection between the value and its position on the slider.

It is recommended to position them below the track.

single discrete slider usage - meter
Single discrete slider – Meter tolerance control

single discrete slider usage timer
usage - timer dropdown instead
usage - timer radio buttons instead
Single discrete slider – Timer
Depending on the scenarios, it could be replaced with a dropdown or radio buttons.
Double continuous sliders

They are used to select a range. And the options for minimum and maximum values are consecutive. Make sure that users can select a range correctly without having to struggle too much to hit a precise value.

double continuous slider usage - brightness
Double continuous slider – Brightness range

It is recommended to use label, not icons, to explicitly explain to the users that they are going to select a range, not a specific value when double sliders are used. Double sliders for range selection are not common knowledge for users in general.

The more vague a user’s idea of what they want, the more likely that desired option would need to be placed in context, ending up in the middle of the selected range. The more confident the user, the more likely that desired option would end up as the lower or upper boundary of the selection. 

double continuous slider usage - price visual
Double continuous slider – Price range

It’s also a good idea to provide extra information to help users make decisions.

double continuous slider usage - price visual
Double continuous slider – Price range with a diagram
The diagram indicates the distribution of the selection. The average price is shown with the slider too. Users could take those information as references. It could help them make decision easier.
Double discrete sliders

They are used to select a range. And the options for minimum and maximum values are limited, from a fixed predefined set.

The double discrete sliders could be replaced by a set of predefined range options. Sometimes, it would be more efficient and much easier to understand. Choose double discrete sliders when the flexibility and freedom of using the values are truly important for the users.

Again, it is recommended to use label, not icons, to explicitly explain to the users that they are going to select a range, not a specific value when double sliders are used. Double sliders for range selection are not common knowledge for users in general.

double discrete slider usage - price
usage - price range dropdown instead
Double continuous slider – Price range with a diagram
The diagram indicates the distribution of the selection. The average price is shown with the slider too. Users could take those information as references. It could help them make decision easier.
Details for all sliders

Icon as a label

Consider an icon instead of a label to explain what it controls when it is easy to understand the meaning of the icon in the context or there is limited space.

icon as a label
Single continuous slider – Brightness
Icon for the brightness is easy to understand, especially in Interact context since all the apps are about light control.

Input field as a supplement

Add input field(s) to the slider as a supplement in the context that users might want to input precise value(s).

If the user has moved a slider’s thumb to a specific position and wants to make a fine adjustment, it’s easy enough to do by removing a few characters from the input rather than retyping it over again. 

input field as supplement
Single continuous slider – Brightness
Users could input a precise value for the brightness directly in the input field.

Extra alternate UI as a supplement

Choose an alternate UI element when picking an exact value is very important to the users in the product or you would like to increase the efficiency. Checkboxes, radio buttons, drop-down list with a set of predefined options might be more efficient than sliders to the users.

alternative UI for size
Single continuous slider + predefined option set – Size
There are 3 ways provided for selecting an image size. User could explore the sizes by using the slider, or put an acute value in the input field. He/she could also choose a predefined size option for quick setting.

A reset option

Consider a reset option to be able to restore the position on the slider — just in case.

When a group of things is selected, it is good to provide a reset button so that users could easily go back to all the initial settings. The typical scenario would be a modal view for filters where there are many dimensions that could be selected.

typical scenario of reset
Double continuous slider in filters
Users could easily reset everything by Reset button.
reset example
Single continuous slider – Group behavior parameter settings in Interact Pro
In this case, there are different light brightness levels to be set. Therefore, a group of sliders are introduced and a Reset button on the top right corner for all the parameters.

Make sure that the track dedicates to the most frequent range.

If a large part of the slider carries the values that user rarely selects, it is not only wasting spaces but also hard for the users to select the value they want. The spacing between the more “promising” values is narrower. Be careful when price-related sliders are introduced.

don't - timer - not linear

Caution – Be careful of using discrete sliders that the scale is not linear.

In this case, there are different light brightness levels to be set. Therefore, a group of sliders are introduced and a Reset button on the top right corner for all the parameters.

Values within a slide are always either progress, growing size or increased intensity for the users.

For example, there are 5 predefined values in a slider, user picks the third one, there is a common expectation that the two options preceding the third one (to its left) will be included in that third option. One direction, with related values “growing” from left to right, is more reliable.

don't - values are not growing

Don’t – Use sliders for values that are not “growing”.

don't - limited option

Don’t – Use sliders for limited options.

don't - exclusive value

Don’t – Use sliders when there are exclusive values.

Behavior
General

Instant feedback

Changes made with sliders are immediate.

  • Everything stays in sync. The cursor’s shape, the hover effects, the position of the knob, the response to clicking and dragging, the change in values, the change of states inside and outside the slider area.
  • The slider is repainted with the result change.
everything synced
Single continuous slider – Demo for slider behavior

Knob dragging

The thumb has to be large enough and the track has to be wide enough to jump to the values. 

As soon as the user has ‘grabbed’ the slider knob, and keeps pressing down, they do not need to keep their finger on the line to scroll left and right. They can use the entire screen to move left and right.

Knob dragging
Single continuous slider – Demo for knob dragging behavior
Single continuous sliders

Both dragging the knob and clicking/tapping on the track are supported.

single continuous sliders drag knob
Single continuous slider – Controlling the slider by dragging knob
single continuous sliders tap track
Single continuous slider – Controlling the slider by clicking/tapping on the track
Single discrete sliders

When user drags the knob, the knob always follows the position that user controls. But it is going to snap to the closest tick mark once the drag behavior is released/stopped.

single discrete sliders drag knob
Single discrete slider – Controlling the slider by dragging knob

When user clicks/taps on the track, the knob is going to snap to the tick mark closest to where user clicks/taps.

The more critical tick marks you need to display, the more space a slider will need. Because the slider will have to be responsive as well, the spacing between these tick marks has to be large enough to not require too much precision. As a reference for the space between tick marks in general, it should be no less than 64dips most of the time.

single discrete sliders tap track
Single discrete slider – Controlling the slider by clicking/tapping on the track
Double continuous sliders

Drag the left knob to control the lower boundary and right knob to control the upper boundary.

double continuous sliders drag knob
Double continuous slider – Controlling the slider by dragging knob
don't - double continuous sliders

Don’t – Switch the position of the knobs, which means user could never move the right knob over the left knob, or the other way around.

When user clicks/taps on the track,

  • User clicks outside of the specified range, intuitively, we’ll look into extending the ranges, rather than change the scope of the range altogether. If the click happens outside of the left boundary, we’d extend the left boundary. If it happens outside of the right boundary, we’d extend the right boundary. Either way, adding a link to restore the initial state would mitigate confusion and unexpected changes.
double continuous sliders tap track outside knob range
Double continuous slider – Controlling the slider by clicking/tapping on the track – Somewhere outside of the specified range
  • User clicks between the range, the knob closer to where user clicks/taps reacts. If the click is closer to the lower boundary, we could shift the left knob. If the click is closer to the upper boundary, we could shift right knob. 
double continuous sliders tap track between knobs
Double continuous slider – Controlling the slider by clicking/tapping on the track – Somewhere between the specified range

When user clicks/taps in the middle of the 2 knobs or the two knobs are very close to each other, the right one always gets priority.

double continuous sliders knob priority
Double continuous slider – Knobs close to each other
Double discrete sliders

Drag the left knob to control the lower boundary and right knob to control the upper boundary. 

Knobs always follow the position that user controls. But they are going to snap to the closest tick mark once the drag behavior is released/stopped.

double discrete sliders drag knob
Double discrete slider – Controlling the slider by dragging knob
don't - double discrete sliders

Don’t – Switch the position of the knobs, which means user could never move the right knob over the left knob, or the other way around.

When user clicks/taps on the track,

  • User clicks outside of the specified range, range is extended. If the click happens outside of the left boundary, we’d extend the left boundary. If it happens outside of the right boundary, we’d extend the right boundary.
double discrete sliders tap track outside knob range
Double discrete slider – Controlling the slider by clicking/tapping on the track – Somewhere outside of the specified range
  • User clicks between the range, the knob closer to where user clicks/taps reacts. If the click is closer to the lower boundary, we could shift the left knob and snap it to the closest value option. If the click is closer to the upper boundary, we could shift right knob to the closest value option.
double discrete sliders tap track between knobs
Double discrete slider – Controlling the slider by clicking/tapping on the track – Somewhere between the specified range
Sliders with input fields

The value in the input field should be synced with the slider.

  • When user uses slider (either dragging the knob(s) or clicking the track), the value(s) in the input field(s) changes at the same time. But the input field(s) is in default state.
relation with input
Single continuous slider + input field – Using slider to control the slider
  • After user enters the value in the input field (either clicking enter on keyboard or leaving the input field), the slider position automatically updates to reflect the new value.
control from input
Single continuous slider + input field – Using input field to control the slider

When the input field is active, the cursor should jump to the end of the input. Clear button could be omitted when fewer digits are expected, especially in mobile cases where space is limited.

input field states
Single continuous slider + input field – Cursor behavior

If user enters an invalid value, the current value should be kept after user clicks enter. Value(s) cannot be saved when there is an error. 

As a consequence, 

  • letters and special characters should be prevented where it makes sense.
  • range that could be input should be shown as help text if it is blurry for the users.
control from input error occurred
Single continuous slider + input field – Demo for error cases 
In this case, after user inputs 105% and clicks enter, the slider goes back to the previous state, which is 50%.

On touch hybrid devices,

  • Triggering input field activates the numeric keyboard at the same time in the context that values are numbers.
  • Make sure that the input field is visible, just above the keyboard.
numeric keyboard
Single continuous slider + input field – Clear is omitted.
In this case, clear button is omitted because the most common case would be that user inputs 1~100 and we would like to keep the slider as long as possible on mobile devices.
Accessibility
  • Use left and right arrows to increment or decrement the value on the slider. 
  • For continuous sliders, choose a value that will make it comfortable to adjust the filter in granular steps.
keyboard control 01
Single continuous slider – Using keyboard to control the slider
In this case, the granular step is 10%.
keyboard control 02
Single discrete slider – Using keyboard to control the slider
The granular step is always the range of the tick mark.

  • Use left and right arrows to increment or decrement the value on the slider.
  • Use tab and shift+tab keys to switch between the knobs.
keyboard control 03
Double continuous slider – Using keyboard to control the slider
In this case, the granular step is 10%.
keyboard control 04
Double discrete slider – Using keyboard to control the slider
The granular step is always the range of the tick mark.
References