Switch
A toggle switch for on/off states. Built on Radix primitives with smooth thumb animation and accessible labeling.
Standalone
<Switch />With Label
<Cluster gap="sm" align="center">
<Switch id="notifications" />
<Label htmlFor="notifications">Enable notifications</Label>
</Cluster>API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | false | The controlled checked state of the switch. |
onCheckedChange | (checked: boolean) => void | — | Callback fired when the switch is toggled. |
disabled | boolean | false | When true, prevents interaction with the switch. |