Switch
A switch turns a setting on or off, taking effect immediately — "Show expired" on a company page. Selected carries the value.
- Design
- Finished
- Level
- Stable
- Audit
- Nothing openat the audit of
- Last changed
- Resources
- Figma Propose a change
Preview


Usage
Do
- Use for a setting that applies the moment it changes, with no save step
- Pair it with a label owned by the surrounding row; the switch has none of its own
- Use for exactly two states, on and off
Don't
- Use inside a form that is submitted: use
Checkbox - Use where the change needs confirmation
- Confuse it with
switchon the❖ Graphicpage, which is a decorative illustration
Behaviour
Selectedmoves theKnoband switches the track colourState(Focus,Hover,Press) andDisabledare managed by code and not applied in static designs
Accessibility
Follows the WAI-ARIA switch pattern: roles, keyboard and focus behaviour.
Level checks
Stable
| Check | Level | Result |
|---|---|---|
| Audited | Ready | Passes |
| No errors open | Ready | Passes |
| Has a description | Ready | Passes |
| Usage and Don't written | Ready | Checked at the next audit |
| Every layer named | Ready | Passes |
| In code | Ready | Passes |
| No warnings open | Stable | Passes |
| Code gen notes written | Stable | Checked at the next audit |
| Auto layout throughout | Stable | Checked at the next audit |
| Matches the design | Stable | Passes |
Properties
| Property | Type | Values | Default |
|---|---|---|---|
| Selected | Variant | FalseTrue | False |
| Disabled | Variant | FalseTrue | False |
| State | Variant | RestFocusHoverPress | Rest |
States
| State | Set by |
|---|---|
| Focus | Interaction |
| Hover | Interaction |
| Press | Interaction |
| Selected | The Selected property |
| Disabled | The Disabled property |
Implementation
| Figma | Code | Why |
|---|---|---|
| Content, inside stroke | border with box-sizing: border-box and padding less the stroke, or box-shadow: inset 0 0 0 <width> | Figma's inside stroke takes no space; a border does. |
| Focus ring, a layer 4px outside the box | outline on :focus-visible, outline-offset 4px less the ring's width | Figma has no focus state, so it draws the ring as a layer; in code it is not an element. |
Selected | aria-selected, aria-pressed or checked | The element's own selection state, by what the element is, so assistive technology announces it. |
Disabled | disabled, or aria-disabled where it must stay focusable | The element's own state: the browser keeps it out of the tab order and out of form submission. |
State: Focus, Hover, Press | :focus-visible, :hover, :active | Pseudo-classes the browser sets, so a template cannot claim a state the control is not in. |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Description | Docs | Patch | Patch |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Content: stroke | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Content: stroke | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Its values moved | Restyled | Minor | Minor | |
| Component | Added | Minor | Minor |