# V checkbox group 6

> 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-6).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-checkbox-group-6
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-checkbox-group-6-light-0a314346e983c3fd.png
- Registry item: https://ui.cnippet.dev/r/v-checkbox-group-6.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-6.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-6.tsx`

```tsx
import { Checkbox } from "@/registry/default/ui/checkbox";
import { CheckboxGroup } from "@/registry/default/ui/checkbox-group";
import { Label } from "@/registry/default/ui/label";

const days = [
  { id: "mon", label: "Mon" },
  { id: "tue", label: "Tue" },
  { id: "wed", label: "Wed" },
  { id: "thu", label: "Thu" },
  { id: "fri", label: "Fri" },
  { id: "sat", label: "Sat" },
  { id: "sun", label: "Sun" },
];

export default function Component() {
  return (
    <CheckboxGroup
      aria-label="Select days"
      className="flex-row flex-wrap gap-x-5 gap-y-3"
      defaultValue={["mon", "tue", "wed", "thu", "fri"]}
    >
      {days.map((day) => (
        <Label key={day.id}>
          <Checkbox value={day.id} />
          {day.label}
        </Label>
      ))}
    </CheckboxGroup>
  );
}
```
