Default
Initially Checked
Form Example
Disabled
Props
| Prop | Type | Description |
|---|---|---|
| checked | boolean | Controlled checked state |
| defaultChecked | boolean | Initial checked state |
| onCheckedChange | (checked: boolean) => void | Change handler |
| disabled | boolean | Disable interaction |
| className | string | Additional classes |
Usage
<Switch id="airplane" />
<Label htmlFor="airplane">Airplane Mode</Label>
<Switch defaultChecked />
<Switch disabled />