Design
Overview
The Switch is a control that turns a single setting on or off. It is made of a knob and a container, and comes in two sizes.
Usage
On/Off
A Switch always has two states: On or Off.
Immediate action
In most cases, toggling a Switch applies changes immediately. However, in some instances, a Switch may be part of a larger form where changes require confirmation (such as an Apply button).
Accessibility
- Switches should have clear labels that describe their function.
- Labels should be readable by screen readers and tappable, making it easier for fans to select or deselect.
- The Switch should have a large enough tap area (minimum 44 × 44px) to ensure ease of use.
States & Feedback
A Switch will provide visual feedback when toggled; the knob moves position and changes colour.
Disabled switches
Disabled switches should be used sparingly, as they prevent fans from receiving feedback when attempting to engage. Whenever possible, keep switches enabled and provide validation or guidance as needed.
Design
Appearance
|
Item |
Usage |
|---|---|
|
1 |
Light Mode |
|
2 |
Dark Mode |
Anatomy
|
Item |
Usage |
|---|---|
|
1 |
Knob |
|
2 |
Container |
Variants
|
Item |
Variant |
|---|---|
|
1 |
Large, Active, On & Off |
|
2 |
Small, Active, On & Off |
|
3 |
Large, Disabled, On & Off |
|
4 |
Small, Disabled, On & Off |
Animation
hum-2 will be used when transitioning between on and off states. See our Motion guidelines for more information.