switch-with-label

PreviousNext
Docs
pureuiexample

Preview

Loading preview…
registry/pure-ui/examples/switch/switch-with-label.tsx
import { Switch } from "@/registry/pure-ui/ui/switch";
import { Label } from "@/registry/pure-ui/ui/label";

export function SwitchWithLabel() {
  return (
    <Label className="cursor-pointer">
      <Switch />
      <span>Enable notifications</span>
    </Label>
  );
}

Installation

npx shadcn@latest add @pureui/switch-with-label

Usage

import { SwitchWithLabel } from "@/components/switch-with-label"
<SwitchWithLabel />