Usage guidelines
- For a binary option that can be either active or inactive (on or off).
- Choosing between related options. Each Switch should be considered a solitary, standalone option. For multiple, related choices, use Checkboxes or RadioGroup instead.
Best practices
Use a label and subtext to give Switch context when possible.
Truncate label text. Instead, allow it to wrap to form another line.
Communicate why a switch is disabled and how to enable it if possible.
Use checkboxes or radio buttons to replace the functionality of a switch. If the functionality is a binary on or off, use Switch instead.
Accessibility
Switches should have Labels that can be read by screen readers, and that can be tapped to make it easier for users to select and deselect.
People use Apple’s accessibility features, such as reduced transparency, VoiceOver, and increased text size to personalize how they interact with their device. Supporting these personalizations ensures that everyone has a great user experience. SeeApple’s Human Interface Guidelines and API documentation about accessibility for iOS:
Design tokens
Anatomy
Variants
Disabled and active states
- Default | Inactive state
Switch is “off” and is not disabled - Default | Active state
Switch is “on” and is not disabled - Disabled | Inactive state
Switch is “off” and is disabled - Disabled | Active state
Switch is “on” and is disabled
Default | Inactive state
Default | Active state
Disabled | Inactive state
Disabled | Active state
With label
- Label left
Label sits to the left of the switch - Label right
Label sits to the right of the switch
Label left
Label right
With subtext
Subtext sits below the Switch label and aligns in the direction of the label.
Writing
- Be clear and brief with Switch labels so they can be easily understood.
- When possible, use verbs to clarify the action. Something like “set…” or “show…”.
- If possible, be clear whether the setting is activated or deactivated.
- Use sentence case for labels.
- Use vague language out of context, like “turn on” or “turn off” repeating the state of the switch is redundant and can clutter the interface.
- Don’t use “you,” “your,” or “my” to describe an action. Instead of “turn on your notifications,” say “turn on notifications.”
Related
- RadioGroup
Use when presenting a user with a list of choices for which there can only be one selection. - Checkbox
Used when presenting a user with a list of choices for which there can be multiple selections. - Fieldset
Used to group a list of related Switches with a legend that describes the list.