# V radio group 5

> Colored Variants

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

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

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-radio-group-5.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/radio-group`

## Files

### `registry/default/variants/v-radio-group-5.tsx`

```tsx
import { Field, FieldLabel } from "@/registry/default/ui/field";
import { RadioGroup, RadioGroupItem } from "@/registry/default/ui/radio-group";

export function Pattern() {
  return (
    <RadioGroup className="w-fit" defaultValue="blue">
      <Field className="flex-row">
        <RadioGroupItem
          className="border-blue-500 data-checked:border-blue-500 [&_.cn-radio-group-indicator]:text-blue-500"
          id="color-blue"
          value="blue"
        />
        <FieldLabel htmlFor="color-blue">Blue</FieldLabel>
      </Field>
      <Field className="flex-row">
        <RadioGroupItem
          className="border-green-500 data-checked:border-green-500 [&_.cn-radio-group-indicator]:text-green-500"
          id="color-green"
          value="green"
        />
        <FieldLabel htmlFor="color-green">Green</FieldLabel>
      </Field>
      <Field className="flex-row">
        <RadioGroupItem
          className="border-yellow-500 data-checked:border-yellow-500 [&_.cn-radio-group-indicator]:text-yellow-500"
          id="color-yellow"
          value="yellow"
        />
        <FieldLabel htmlFor="color-yellow">Yellow</FieldLabel>
      </Field>
    </RadioGroup>
  );
}
```
