A Switch toggles between two mutually exclusive states such as "On" or "Off." Unlike a checkbox, a switch initiates an action with immediate effect without requiring a "Save" or "Submit" action.
Rules of Thumb
- Use a switch for immediate state changes between two mutually exclusive options.
- For non-immediate changes, use radio buttons for mutually exclusive options or checkboxes for non-exclusive options.
- For immediate actions instead of state changes, use an action button.
- On a page, each switch is independent of all other switches.
- An intelligent default should be set for the initial state of a switch.
Appearance and Behavior
A switch consists of a circular button that slides across a track to display the "Off" (left) or "On" (right) state. Clicking anywhere on the switch component will cause the switch to change states immediately.
To learn more about adding Help Text to Switches, see the Forms and Validation guidance.