---
url: /components/switch/guidelines.md
description: >-
  Switches toggle the selection of an item on or off. Switches are the best way
  to let users adjust settings.
---

# Switch

Switches toggle the selection of an item on or off. Switches are the best way to let users adjust settings.

[Overview](overview.md) · [Specs](specs.md) · **Guidelines** · [Accessibility](accessibility.md)

![A switch in 2 states, off and on.](/assets/cd66e38f-mg7sxhp8-01.B8oCkHwS.webp)

Switches change settings and other options immediately

## Usage

Switches are best used to adjust settings and other standalone options. 

They make a binary [selection](../../foundations/interaction/selection.md "Selection lets users choose specific items to act on."):

* On and off
* True and false

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

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Flwa9phy3-GM3-Components-Switch-1-v01.mp4?alt=media" aria-label="Toggling a switch turns on dark mode in Settings on a mobile device."></video>

Use a switch to turn an option on and off

Use switches to:

* Toggle a single item on or off
* Immediately activate or deactivate something

![Switch used in notification settings to turn on and off the "play over notifications" function.](/assets/57d57ec4-mg7txet6-03.DJrBBW08.webp)

Switches are commonly used on mobile to turn settings on or off

Switches control binary options, not opposing ones. A binary option represents a single [selection](../../foundations/interaction/selection.md "Selection lets users choose specific items to act on.") 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](../lists/overview.md "Lists are continuous, vertical indexes of text and images.") or map view. Use a [connected button group](../button-groups/overview.md "Connected button groups have smaller inner corners and are best used for selection.") instead.

::: tip Do
![A connected button group with options of List View and Map View.](/assets/2ab8c72c-mg7uio91-05-do.CjjeFGbd.webp)

Use a connected button group to choose between opposing options
:::

::: danger Don't
![A switch with non-binary options of List View and Map View.](/assets/6a32b9d8-mg7ukia8-06-dont.OP0dNP4T.webp)

Avoid using switches to toggle between opposing options
:::

### Alternate selection controls

[Checkboxes](../checkbox/overview.md "Checkboxes let users select one or more items from a list, or turn an item on or off."), [radio buttons](../radio-button/overview.md "Radio buttons let people select one option from a set of options."), 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.

![2 checkboxes, 1 unchecked and 1 checked.](/assets/a93a637f-mg7ul4t0-07.DoWlrZup.webp)

Checkboxes

![2 radio buttons, 1 in an enabled state, 1 in a disabled state.](/assets/34f642e7-mg7ulhxp-08.WsnDdUeB.webp)

Radio buttons

::: tip Do
![Mobile screen with checkboxes to select list items and call to action button to update the list.](/assets/2fb00285-mg7ustxv-09_do.DTQuen4U.webp)

Use checkboxes (not switches) to let people select one or more options from a list
:::

::: danger Don't
![Mobile screen with checkboxes to select list items and call to action switch to update the list.](/assets/4116a7dc-mg7ut60g-10_don-t.CfNUFGsz.webp)

A switch can't replace a button. People expect a call to action to be a button, not a switch.
:::

::: tip Do
![Radio buttons used to select a language for a mobile app.](/assets/c402ed09-mg7uvzmf-11_do.CCNH91-p.webp)

Use radio buttons (not switches) when only one item can be selected from a list
:::

::: danger Don't
![Mobile screen with switches to select list items and call to action button to update the list.](/assets/b5747067-mg7vc3q1-12_don-t.DqPVMtnS.webp)

Avoid using a switch to select multiple options that require people to save. Switches should be immediate. Use checkboxes instead.
:::

## Anatomy

![3 elements of a switch.](/assets/58b3d0fa-mg7vge0i-13.DTaGfWok.webp)

1. Track
2. Handle
3. Icon (optional)

### Icon (optional)

The switch handle can contain an optional icon.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Flwabkmev-GM3-Components-Switch-2-v01.mp4?alt=media" aria-label="A checkmark appears on the filled circle of a handle when the switch is toggled on."></video>

The icon within the handle should always communicate the switch's selection

Icons can be used to visually emphasize the switch’s [selection](../../foundations/interaction/selection.md "Selection lets users choose specific items to act on."). The icon’s meaning should be clear and unambiguous to help the people understand whether switch is on or off.

::: tip Do
![2 switches, the unselected state icon is an X, and the selected state is a checkmark.](/assets/63310b4f-mg7vjfr0-15_do.CAJE21Gx.webp)

Use icons that clearly communicate whether the switch is on or off, such as an X and a checkmark
:::

::: danger Don't
![A switch’s unselected handle icon is a moon and the selected state icon is a pencil.](/assets/1c6787f0-mg7vpyog-16_don-t.CCibZ7G4.webp)

Avoid using more ambiguous or non-binary icons, such as a moon or edit icon
:::

### Label text

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

::: tip Do
![Switch label text: 1. Permission manager, App has access to your data. 2. Camera access, app has access to your camera. 3. Show password.](/assets/5026c394-mg7vyj3y-17_do.BgXNjS9n.webp)

Keep labels short and direct. A label should describe what the control does when the switch is on.
:::

::: danger Don't
![On a mobile screen’s privacy settings, 2 switches have “On” label text and checkmark icons. The last switch has “Off” label text and no icon.](/assets/6c70f1f5-mg7vz4xm-18_don-t.jYoFRkX1.webp)

Don't add label text into the switch; the font size would be too small to be accessible. Use an appropriate icon instead.
:::

## Placement

Switches are often arranged in stacked [layouts](../../foundations/layout/layout-overview/overview.md "Layout is the visual arrangement of elements on the screen.").

![Screen showing labels and stacked switches in varying on/off modes.](/assets/5287ae04-mg7xvplw-19_placement.B7OHikaW.webp)

Settings screens are common places to use switches

## Behavior

A switch is successfully toggled when the handle slides to the other side of the track after an interaction.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Flwabqhfg-GM3-Components-Switch-3-v01.mp4?alt=media" aria-label="A switch is toggled to turn on airplane mode and Wi-Fi switch automatically turns off."></video>

When selected, the switch handle slides to the opposite end of the track

When a person toggles a switch, its handle size changes and the corresponding action takes effect immediately.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Flwabqzdx-GM3-Components-Switch-4-v01.mp4?alt=media" aria-label="When selected the switch’s handle gets larger and a checkmark appears on the filled circle."></video>

The **on** state of the switch is indicated by a larger handle size
