Switch
Accessible toggle with a spring thumb.
a11yform
Customize
Checked
Disabled
Accessible label
Props
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | — | Controlled on/off state. |
defaultChecked | boolean | false | Initial state when uncontrolled. |
onCheckedChange | (checked: boolean) => void | — | Fired on toggle. |
disabled | boolean | false | Disable interaction. |
label | string | — | Accessible label (aria-label). |
className | string | — | Extra classes. |