Switch

Switch is a binary control used as a toggle between two different states. When engaged, the thumb travels within the track to indicate change of state. Use it for adjusting settings, preferences or actions within an application or system.

Also known as: Light switch, Toggle, Toggle switch
Salt package@salt-ds/core
Available since1.10.0
Note: This tab list includes overflow; tab positions may be inaccurate or change when a tab is selected
KeyFunction
Tab
  • If focus is on the previous element in the tab order, Tab moves focus to the switch.
  • If focus is on switch, Tab moves focus to the next focusable element in the tab order.
Space
  • Space activates switch to change between checked and unchecked state.
Shift + Tab
  • If focus is on the switch, this action moves focus out of the component and sets the focus to the previous component in the tab order.
  • If focus is below the switch, this action moves focus to the switch.