Toggle

A digital on/off switch that always has a default value and prompts users to choose between two mutually exclusive options. Toggles should also provide immediate results.

Component checklist

Status

The status of the component

Ready for use!

Figma component

A link to the Figma library where the component lives.

Repository

A link to the repo where the component lives.

Usage


Toggles are for immediate results

Toggle switches should implement changes instantly without requiring additional actions like clicking "Save" or "Submit." 

Immediate results

 

When to use a toggle vs a checkbox

A toggle is used when there is activation (switching something on/off) involved - this activation should also be instantaneous.
If the selection does not provide immediate results, then a checkbox should be considered.

Do
Label, options with checkboxes and a button.

Use checkboxes in case there is another action (in this case button) required for the change to take effect.

Don't
Label, options with toggles and a button.

Avoid using toggles in cases where an additional button is required (for eg. forms) for the change to take effect.

 

Labels should remain the same

Our toggle component currently has only one label that describes the value that the user can change.
To avoid confusion, do not update the label upon change of the on or off states.

Do
Two toggles, one is selected with both labels the same.

Keep labels the same regardless of the toggle’s on/off state.

Don't
Two toggles, one is seleceted with labels referring if the toggle is on or off.

Avoid changing the labels or adding the words on and off to indicate the toggle’s state, as it might confuse users (especially the ones using assistive technology).