Switch
View on shadcn/uiA control that allows the user to toggle between checked and not checked.
Installation
pnpm dlx shadcn@latest add https://designsystem.wfp.org/r/switch.jsonUsage
import { Switch } from "@/components/ui/switch";<Switch />Examples
Size
Use the size prop to change the size of the switch.
API reference
Switch
| Prop | Type | Default |
|---|---|---|
size | "sm" | "default" | "default" |
See the Radix UI Switch documentation for additional props.