# Colored radio group

> Colored radio group

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

- Page, with a live preview: https://shadcn.exchange/r/reui/c-radio-group-5
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-radio-group-5-light-25a26f9768e0efc2.png
- Registry item: https://reui.io/r/new-york-v4/c-radio-group-5.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://reui.io/r/new-york-v4/c-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: `field`, `radio-group`

## Files

### `c-radio-group-5.tsx`

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

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