# V checkbox group 10

> Basic checkbox group

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/v-checkbox-group-10).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-checkbox-group-10
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-checkbox-group-10-light-3e75e71cb9b162b3.png
- Registry item: https://ui.cnippet.dev/r/v-checkbox-group-10.json
- Categories: checkbox group
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-checkbox-group-10.json
```

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

## Dependencies

- Registry items: `@cnippet/checkbox-group`

## Files

### `registry/default/variants/v-checkbox-group-10.tsx`

```tsx
import type { LucideIcon } from "lucide-react";
import {
  BellIcon,
  MailIcon,
  MessageSquareIcon,
  SmartphoneIcon,
} from "lucide-react";
import { Checkbox } from "@/registry/default/ui/checkbox";
import { CheckboxGroup } from "@/registry/default/ui/checkbox-group";
import { Label } from "@/registry/default/ui/label";

type Channel = { Icon: LucideIcon; id: string; label: string };

const channels: Channel[] = [
  { Icon: MailIcon, id: "email", label: "Email" },
  { Icon: BellIcon, id: "push", label: "Push" },
  { Icon: SmartphoneIcon, id: "sms", label: "SMS" },
  { Icon: MessageSquareIcon, id: "in-app", label: "In-app" },
];

export default function Component() {
  return (
    <CheckboxGroup
      aria-label="Notification channels"
      className="flex-row gap-x-5"
      defaultValue={["email", "in-app"]}
    >
      {channels.map(({ Icon, id, label }) => (
        <Label key={id}>
          <Checkbox value={id} />
          <Icon aria-hidden="true" className="size-4 opacity-70" />
          {label}
        </Label>
      ))}
    </CheckboxGroup>
  );
}
```
