Switch
Toggle switch with animated thumb and label.
Installation
npx shadcn@latest add https://www.fluidfunctionalism.com/r/switch.jsonBasic
Notifications
Disabled
Disabled option
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | — | Text label displayed next to the switch. |
| checked | boolean | — | Whether the switch is on. |
| onToggle | () => void | — | Called when the switch is toggled. |
| disabled | boolean | false | Disables the switch. |