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

PropTypeDefaultDescription
checkedbooleanfalseThe controlled checked state of the switch.
onCheckedChange(checked: boolean) => voidCallback fired when the switch is toggled.
disabledbooleanfalseWhen true, prevents interaction with the switch.