Back to Switch
View full API on Switch
Switch
Controlled
External state with conditional feedback.
Toggle to preview the setting — does not change site theme here.
API
| Prop | Type | Default | Description |
|---|---|---|---|
| checked / defaultChecked | boolean | — | Controlled / uncontrolled on state. |
| onCheckedChange | (checked: boolean) => void | — | Fires when the value changes. |
| label | React.ReactNode | — | Top field label. |
| text | React.ReactNode | — | Inline label text beside the switch. |
| helpText | React.ReactNode | — | Supplementary help text. |
| controlPosition | "start" | "end" | end | Inline-start/end placement (RTL-aware). |
| disabled | boolean | — | Native disabled state. |