# Inline horizontal radio group

> Inline horizontal 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-16).

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

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

export function Pattern() {
  return (
    <RadioGroup
      defaultValue="viewer"
      className="mx-auto flex w-auto flex-wrap items-center gap-6"
    >
      <Field orientation="horizontal" className="w-auto">
        <RadioGroupItem value="admin" id="role-admin" />
        <FieldLabel htmlFor="role-admin" className="cursor-pointer">
          Admin
        </FieldLabel>
      </Field>
      <Field orientation="horizontal" className="w-auto">
        <RadioGroupItem value="editor" id="role-editor" />
        <FieldLabel htmlFor="role-editor" className="cursor-pointer">
          Editor
        </FieldLabel>
      </Field>
      <Field orientation="horizontal" className="w-auto">
        <RadioGroupItem value="viewer" id="role-viewer" />
        <FieldLabel htmlFor="role-viewer" className="cursor-pointer">
          Viewer
        </FieldLabel>
      </Field>
    </RadioGroup>
  )
}
```
