Switch
Bindable binary switch with visible or aria-only labeling.
Use Switch for a setting that takes effect as soon as it changes. The thumb keeps the same inset in both states.
Interactive example
Loading interactive example
API
| Member | Type | Kind | Required | Default |
|---|---|---|---|---|
ariaLabel | string | prop | No | undefined |
checked | boolean | binding | No | false |
disabled | boolean | prop | No | false |
label | string | prop | No | undefined |
onCheckedChange | (checked: boolean) => void | callback | No | undefined |
size | ControlSize | prop | No | 'md' |
Examples
Source
Loading source