Switch
UIToggle switch for binary on/off settings. Always pill-shaped regardless of theme radius.
[EXAMPLES]
Interactive
[DISABLED]
[PROPS]
| PROP | TYPE | DEFAULT | DESCRIPTION |
|---|---|---|---|
| checked | boolean | — | Controlled checked state |
| onCheckedChange | (checked: boolean) => void | — | Toggle callback |
| disabled | boolean | false | Disable the switch |
[ACCESSIBILITY]
KEYBOARD SHORTCUTS
| KEY | ACTION |
|---|---|
| Space | Toggle the switch |
ARIA
- >role="switch"
- >aria-checked reflects state