Switch: Guidelines
Switches toggle the selection of an item on and off

Usage
Switches are best used to adjust settings and other standalone options.
They make a binary selection:
- On and off
- True and false
The effects of a switch should start immediately, without needing to save.
Use switches to:
- Toggle a single item on or off
- Immediately activate or deactivate something

Switches control binary options, not opposing ones. A binary option represents a single selection that's either on or off.
Opposing options are when only one option in a set can be selected at a time, like a list or map view. Use a connected button group instead.


Alternate selection controls
Checkboxes, radio buttons, and switches are the three main kinds of selection controls. They help people make choices, like selecting options or turning settings on and off.
Use checkboxes to select multiple related options in a list.
Use radio buttons to select a single option in a list.
Use switches to select standalone or more verbose options in a list, like settings.






Anatomy

- Track
- Handle
- Icon (optional)
Icon (optional)
The switch handle can contain an optional icon.
Icons can be used to visually emphasize the switch's selection. The icon's meaning should be clear and unambiguous to help the people understand whether switch is on or off.


Label text
Switches should always be paired with an inline label describing what the switch controls when selected.


Placement
Switches are often arranged in stacked layouts.

Behavior
A switch is successfully toggled when the handle slides to the other side of the track after an interaction.
When a person toggles a switch, its handle size changes and the corresponding action takes effect immediately.