Switch
A toggle control for binary on/off states with immediate effect. Built on Radix UI Switch.
Default
States
Usage
Use switches for settings that take effect immediately (e.g. dark mode, notifications). For form submissions, use a Checkbox instead.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | boolean | — | Controlled checked state |
| onCheckedChange | (checked: boolean) => void | — | Callback when state changes |
| disabled | boolean | false | Disables the switch |