# Radio Group

> A set of mutually-exclusive radio options.

_Updated: 2026-06-04_

A set of mutually-exclusive radio options.

## Installation

```bash
railbase ui add radio-group
```

> [!NOTE]
> `railbase ui add` also copies shared primitives — they ship alongside this component automatically.

## Usage

```tsx
import { RadioGroup, RadioGroupItem } from "@/lib/ui/radio-group";

<RadioGroup defaultValue="a">
  <div class="flex items-center gap-2"><RadioGroupItem value="a" id="a" /><Label for="a">Option A</Label></div>
  <div class="flex items-center gap-2"><RadioGroupItem value="b" id="b" /><Label for="b">Option B</Label></div>
</RadioGroup>
```

## Anatomy

Exported parts: `RadioGroup` · `RadioGroupItem`
