Switch

Toggle switch with animated thumb and label.

Installation

npx shadcn@latest add https://www.fluidfunctionalism.com/r/switch.json

Basic

Notifications

Disabled

Disabled option

API Reference

PropTypeDefaultDescription
labelstringText label displayed next to the switch.
checkedbooleanWhether the switch is on.
onToggle() => voidCalled when the switch is toggled.
disabledbooleanfalseDisables the switch.