Switch/switch-labeled-

PreviousNext

A switch/switch-labeled- example

Docs
shadcnblocksblock

Preview

Loading preview…
code/example/switch/switch-labeled-1.tsx
"use client";

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

export const title = "Switch with Label";

const Example = () => (
  <div className="flex items-center gap-2">
    <Switch id="airplane-mode" />
    <Label htmlFor="airplane-mode">Airplane Mode</Label>
  </div>
);

export default Example;

Installation

npx shadcn@latest add @shadcnblocks/switch-switch-labeled-1

Usage

import { SwitchSwitchLabeled1 } from "@/components/switch-switch-labeled-1"
<SwitchSwitchLabeled1 />