Switch
Toggle control for on/off states. Built on a native checkbox for accessibility.
Playground
label
size
checked
Label pos
disabled
rounded
<Switch/>Basic
Label Position
Label can be placed on either side of the track.
Sizes
Disabled
API
| Property | Type | Default | Description |
|---|---|---|---|
checked | boolean | false | Controlled checked state |
onChange | (e: ChangeEvent) => void | — | Change handler |
label | ReactNode | — | Label text next to the switch |
labelPosition | "left" | "right" | "right" | Label position relative to the track |
size | "sm" | "md" | "lg" | "md" | Size preset |
disabled | boolean | false | Disable the switch |