Toggle
A toggle switches the site between its light and dark themes, from the top navigation. It is a group of two Toggle - button instances, one per theme, of which exactly one is selected.
- Design
- Finished
- Level
- Ready
- Audit
- 2 open findingsat the audit of
- Last changed
- Resources
- Figma Propose a change
Preview


Usage
Behaviour
- Selecting one
Toggle - buttondeselects the other; the theme changes immediately
Composition
- Contains two
Toggle - buttoninstances, withsunandmoon-starsupplied through theirIcon swap
Accessibility
Follows the WAI-ARIA switch pattern: roles, keyboard and focus behaviour.
Dependencies in Figma
Built from
Used by
Level checks
Ready · next level blocked by Warnings open
| 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 | Not yet |
| Code gen notes written | Stable | Checked at the next audit |
| Auto layout throughout | Stable | Checked at the next audit |
| Matches the design | Stable | Passes |
Anatomy
| # | Part | Shown | Component |
|---|---|---|---|
| 1 | Toggle - button × 2 | Always | Toggle - button |
Implementation
| Figma | Code | Why |
|---|---|---|
| The component, 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. |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Description | Docs | Patch | Patch |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Toggle: stroke | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Toggle: stroke | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Toggle - button: props | Restyled | Minor | Minor | |
| Toggle - button#2: props | Restyled | Minor | Minor | |
| Component | Added | Minor | Minor |