Components › Forms
Switch
An on and off setting that applies immediately.
Installation
npx plankui@latest add switchUsage
import { Switch } from "@/components/ui/switch";
<Switch id="wifi" defaultChecked />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| checked / defaultChecked | boolean | State. | |
| onCheckedChange | (checked: boolean) => void | Called on toggle. | |
| size | "sm" | "md" | "md" | Track size. |