Switch

A switch gives users control over a feature or option that can toggle between two possible states.

How to use switches

Switches are used for binary actions where the action of using the switch should be immediate. They are typically used for ‘on/off’ states.

When using switches:

  • Always have a unique label for each switch
  • Programmatically connect each label to its corresponding switch
  • If you have a list of switches, the switches should work independently from each other, so using one switch shouldn’t change the status of another switch in the list

Types of switches

Transparent

Transparent switches give a simple, clean look.

  • Interactive demo - Sainsbury's

Outlined

Outlined switches are used to give visual impact and distinction.

  • Interactive demo - Sainsbury's

With text

Switches have visible supporting text to describe the action.

  • Interactive demo - Sainsbury's

Standalone

Standalone switches let you remove text for more flexibility with the position of the switch. Make sure that context is provided to the user by the surrounding content of the switch and that the switch has an accessible name.

  • Interactive demo - Sainsbury's

Copy guidelines

Clearly describe what the switch does, but don't use the words 'on' or 'off'. The visual state communicates whether the switch is on or off. Including on/off text can create more confusion.

Do
**Dark mode**
Don't
**Turn dark mode on**

If required, you can use supporting text under the label to describe what the switch does, and what state it's currently in.

Do
**Dark mode**
Don't
**Turn dark mode on**

If required, you can use supporting text under the label to describe what the switch does, and what state it's currently in.

Do
**Dark mode** Off | Changes the interface to show light text on a dark background.

When using switches:

  • Start your switch labels with a capital letter
  • Don’t use commas or any punctuation at the end of each label
  • Don’t use more than three words per label

Was this page helpful?


Get in touch

Our team can answer any questions about using switches or give you a helping hand with your next project.
Select a theme to demo: