#Overview

Toggle switches allow users to quickly switch between two possible states: on or off.

They can be thought of as a checkbox with a submit button, all-in-one, so their selection takes effect immediately.

overview

#When to use

  • To toggle a single item on or off with immediate effect
  • For multiple items in a list that can be individually controlled, such as user settings

#Don’t use for

  • To toggle between opposing options (use a Segmented Button)
  • If options require a button to apply the setting, such as submitting a form (use a Checkbox)

#Anatomy

anatomy
  1. Handle
  2. Track
  3. Label

#Spacing

The label’s font size differs between desktop (14px) and mobile (16px).

spacing

#Best practices

#No waiting time

Do

The effects of a switch should start immediately, without needing to save.

image-do

Don't

Do not use a spinner inside a switch.

image-do

#A switch controls binary options, not opposing

Do

Use a segmented button to choose between opposing options, such as the Grid and List views on a Product Type page (PT).

image-do

Don't

A switch does not control opposing options.

image-dont

#Use descriptive labels

Do

The function of a switch should be described in detail.

image-do

Do

When required, additional information can be placed in a popover (i) next to the switch.

image-do

#Placement

#Customer account

account

#Customer notifications

notifications

#States

#Galaxus

states-galaxus

#Digitec

states-digitec
  1. Off: Normal
  2. Off: Focus-visible
  3. Off: Disabled
  4. Activated: Normal
  5. Activated: Focus-visible
  6. Activated: Disabled

#Behavior

Upon clicking the switch, it is successfully toggled when the handle slides to the opposite side. The corresponding action takes effect immediately.