Switch

PreviousNext

A control that allows the user to toggle between checked and not checked.

Docs
bunduicomponent

Preview

Loading preview…
examples/components/switch/01/page.tsx
import { Label } from "@/components/ui/label";
import { Switch } from "@/components/ui/switch";

export default function SwitchDemo() {
  return (
    <div className="flex items-center space-x-2">
      <Switch id="airplane-mode" />
      <Label htmlFor="airplane-mode">Airplane Mode</Label>
    </div>
  );
}

Installation

npx shadcn@latest add @bundui/switch

Usage

import { Switch } from "@/components/switch"
<Switch />