Skip to content

Switch

The switch component allows to toggle settings between two states.

Usage

Switches immediately trigger an effect when being clicked. Examples are: On/Off, Online/Offline or Installed/Not installed.

Switch

When to use

  • When there is a binary state that the user should be able to toggle instantly.

Best practices

  • Use a stable label that describes the setting being controlled, not the action or current state.
  • Let the switch communicate its state. Additional text such as On or Off may be displayed when explicit state information is needed.
  • Do not change the label when the switch state changes.
  • Switches apply changes immediately and must not require an additional submit button.

Except where otherwise noted, content on this site is licensed under MIT License.