Skip to main content

Toggle Switch

UI Design

What is a Toggle Switch

A toggle switch is a control that turns a single setting on or off, like a light switch. It always has a value, on or off, and the change usually takes effect immediately.

How a Toggle Switch works

  • Two states: On and off, never undecided
  • Immediate result: No Save button needed
  • Clear label: Says what the switch controls
  • Visible state: Thumb position and color, not color alone

When to use a Toggle Switch

Use toggles for settings and preferences that apply right away, such as notifications, dark mode or Wi-Fi. If the choice only applies after users submit a form, use a checkbox instead. For choices between more than two options, use radio buttons.

Toggle Switch best practices

Write a short, stable label that describes the setting, not the action. Make the on and off states obviously different, and animate the switch quickly, around 100 ms. Give the switch a large enough touch target and the correct accessible role.

Frequently asked questions

When should you use a toggle switch instead of a checkbox?

Use a toggle when the change takes effect immediately, like turning on Wi-Fi. Use a checkbox when users make choices that apply only after they press a button such as Save or Submit.

Does a toggle switch need a label?

Yes. The label should say what the switch controls, such as "Email notifications". Avoid labels that change with the state, which make it unclear whether the text describes the current state or the action.

Is color enough to show the on and off states?

No. Apple advises against relying only on color, because not everyone can see the difference. Combine color with the thumb's position and, where needed, an icon or text.