Switch
Binary on/off control - 3 sets across Layout group / large active / large inactive masters.
Live preview
Switch · variant matrix
4 rows (colors × sizes) × 4 states. Rows auto-derived from `SWITCH_COLORS × SWITCH_SIZES` runtime arrays — add a color/size to `@dol/ui/switch` to auto-surface here.
| Off | On | Off (disabled) | On (disabled) | |
|---|---|---|---|---|
| Primary · sm | ||||
| Primary · md | ||||
| Tertiary · sm | ||||
| Tertiary · md |
Interactive
→ Notifications: on
Import & files
Import
import { Switch } from "@dol/ui/switch";- Source file
packages/@dol/ui/src/switch/Switch.tsx
Figma source
Figma source 3 sets
- Page
- Switch
- Sets
- 3 + 5 standalone
- Primary set
-
Switch/Text and Icon· 36 variants Open in Figma →
Showing:
Switch/Text and Icon AI context
AI context
Markdown summary safe to paste into Claude / ChatGPT / Cursor — includes name, status, import, props, axes, examples, figma source.
# SwitchSlug: `switch`Domain: general · Category: actionsDesign: stable · Code: coded
## DescriptionBinary on/off control - 3 sets across Layout group / large active / large inactive masters.
## Import```tsimport { Switch } from "@dol/ui/switch";```Source: `packages/@dol/ui/src/switch/Switch.tsx`
## Figma sourcePage: SwitchSets: 3Primary: Switch/Text and IconOpen: https://www.figma.com/design/DqRd7UQkNGcdvYL5fwZxlf/?node-id=3404-22796Related
Status legend
Status legend
- Stable
- Design + code shipped, full DS parity.
- Partial
- Design ready, some variants/states missing in code.
- Coded
- Implemented in code; design canon may not yet exist.
- Design only / Code only
- One side present; awaiting the other.
Phase 1.X-5.2 detail view — read-only metadata. Code preview + recipe + live demo deferred (need @dol/ui registry integration).