Github

Switch

A turn on and off effect having switch ui premitive

import { Switch } from "@/components/ui/switch";

export function SwitchDemo() {
  return (
    <div className="flex items-center gap-3">
      <Switch id="airplane-mode" />
      <label htmlFor="airplane-mode" className="text-sm font-medium">
        Airplane mode
      </label>
    </div>
  );
}

Installation

pnpm dlx shadcn@latest add https://components.sudarshandhakal.com.np/r/switch.json

Usage

import { Switch } from "@/components/ui/switch"

Reference

Add props, examples, and notes here once the primitive is implemented.