Toggle Switch
UI DesignWhat 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.
Related terms
View all UI Design terms →Checkbox
A checkbox is a form control that lets users select any number of options , including none. Each checkbox works on its own, so checking…
Radio Button
A radio button is a form control that lets users select exactly one option from a list. Selecting one option deselects the others in the…
Interactive States
Interactive states are the visual changes that show how a component responds to the user. They tell users whether an element can be used…
Micro-interactions
Micro-interactions are contained product moments that perform a single, specific task. They are the small, subtle animations and responses…
UI Elements
UI Elements are the individual components that make up a user interface. They are the building blocks used to create interactive…
Touch Target Size
Touch target size is the size of the area users can tap to activate an element, such as a button, link or icon. The target can be larger…
