# Radio group with badges

> Radio group with badges

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

- Page, with a live preview: https://shadcn.exchange/r/reui/c-radio-group-15
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-radio-group-15-light-fdd7f83a533bd55e.png
- Registry item: https://reui.io/r/new-york-v4/c-radio-group-15.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-15.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: `badge`, `field`, `radio-group`

## Files

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

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

export function Pattern() {
  return (
    <RadioGroup defaultValue="stable" className="w-fit">
      <Field orientation="horizontal">
        <RadioGroupItem value="stable" id="ch-stable" />
        <div className="flex items-center gap-2">
          <FieldLabel htmlFor="ch-stable">Stable</FieldLabel>
          <Badge
            variant="secondary"
            className="h-4.5 rounded-full px-1.5 text-[10px] tracking-wider uppercase"
          >
            Recommended
          </Badge>
        </div>
      </Field>
      <Field orientation="horizontal">
        <RadioGroupItem value="beta" id="ch-beta" />
        <div className="flex items-center gap-2">
          <FieldLabel htmlFor="ch-beta">Beta</FieldLabel>
          <Badge className="h-4.5 rounded-full px-1.5 text-[10px] tracking-wider uppercase">
            New
          </Badge>
        </div>
      </Field>
      <Field orientation="horizontal">
        <RadioGroupItem value="canary" id="ch-canary" />
        <FieldLabel htmlFor="ch-canary">Canary</FieldLabel>
      </Field>
    </RadioGroup>
  )
}
```
