Switch (atom)
MUI Switch themed to the Tech Fleet primary. Replaces src/components/ui/switch.tsx.
- Layer: atom · Status: WRAP · Import:
import { Switch } from "@/design-system"
Live demo
API
Full MUI SwitchProps.
Deviation from stock MUI
- Checked track =
primary; unchecked track =divider(themeMuiSwitch). Note: MUI's toggle usesrole="switch"on its input (notcheckbox) — relevant when querying in tests.
Behavior (→ tests)
- Renders a toggle input, unchecked by default.
Usage
tsx
<Switch id="notify" defaultChecked />
<Label htmlFor="notify">Notifications</Label>