Switch
Use Switch for single cell options that can be turned on and off only. If you have a cell with multiple options that can activated, consider using Checkbox.
Switch supports right-to-left(RTL) language locales layout (auto flip on RTL locales like Arabic).
Props
Usage guidelines
When to use
- For a binary option that can be either active or inactive.
- Typically used on mobile, where toggling the Switch takes immediate effect.
When not to use
- Choosing between related options. Each Switch should be considered a solitary, standalone option. For multiple, related choices, use Checkboxes or RadioButtons instead.
Variants
With a label
Whenever using Switch, always use a Label with it to make your component accessible.