Switch
A control that toggles between on and off.
Installation
pnpm dlx shadcn@latest add @columbus/switchUsage
Wrap the switch in a <label>, or pass aria-label, so it has an accessible
name.
import { Switch } from "@/components/ui/switch";
<label className="gap-2 flex items-center">
<Switch onCheckedChange={(checked) => console.log(checked)} />
Notifications
</label>;API reference
Also accepts every Base UI Switch.Root prop.
Prop
Type