# Switch Icons 2 - Icon with label

> Icon with Label.

A shadcn/ui block from the [@shadcnblocks](https://shadcnblocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcnblocks/switch-switch-icons-2).

- Page, with a live preview: https://shadcn.exchange/r/shadcnblocks/switch-switch-icons-2
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcnblocks/switch-switch-icons-2-light-a8da8c38438e9c44.png
- Registry item: https://shadcnblocks.com/r/switch-switch-icons-2.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://shadcnblocks.com/r/switch-switch-icons-2.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `lucide-react`
- Registry items: `label`, `switch`

## Files

### `example/switch/switch-icons-2.tsx`

```tsx
"use client";

import { BellIcon } from "lucide-react";

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

export const title = "Icon with Label";

const Example = () => (
  <div className="flex items-center gap-3">
    <BellIcon className="size-4 text-muted-foreground" />
    <div className="flex flex-1 items-center justify-between gap-4">
      <Label htmlFor="notifications">Notifications</Label>
      <Switch defaultChecked id="notifications" />
    </div>
  </div>
);

export default Example;
```
