Switch
Toggle a binary setting with a native control and an accessible label.
Basic usage
Keep the label stable in both states. Use defaultChecked to start with the setting on, or checked with onCheckedChange to control the choice.
Receive updates about your workspace.
API
Key props and defaults.
| Prop | Values and behavior | Default |
|---|---|---|
checked / defaultChecked | boolean | false |
onCheckedChange | (details) => void | — |
variant | solid | outline | solid |
labelPosition | start | end | end |
rounded | boolean | true |