1.3 KiB
1.3 KiB
- Home
- Components
- Switch
Switch
A control that allows the user to toggle between checked and not checked.
DocsAPI Referenceshadcn/ui## Props
| Prop | Type | Default | Description |
|---|---|---|---|
| ...Radix props | ComponentProps | - | All Radix switch root props |
Examples
<Switch id="notifications" defaultChecked />
Usage
Switch Switch checked Switch disabled Switch disabled checked ```jsx
Switch
Switch checked
Switch disabled
Switch disabled checked