---
title: "Radio Group"
description: "Pick one option from a short list. Each option is a round radio with its label, or a larger tile with a picture."
url: https://gelatinui.com/components/radio-group
markdown_url: https://gelatinui.com/components/radio-group.md
access: free
install: "npx shadcn@latest add @gelatin-ui/radio-group"
registry_item: https://gelatinui.com/r/radio-group.json
version: "2026-11-08"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Radio Group

> Pick one option from a short list. Each option is a round radio with its label, or a larger tile with a picture.

Page: https://gelatinui.com/components/radio-group

## When to use it

Best for: One choice from 2 to 5 options that a person must see at once.

- Use it for 2 to 5 options. More go in a Select.
- Use `size="lg"` for a form with a lot of space.
- Use `RadioGroupTileList` for a pick that a small picture shows best.

## When not to use it

- For more than 5 options, use a [Select](https://gelatinui.com/components/select.md).
- For a value that sets a view at once, use a [Segmented Control](https://gelatinui.com/components/segmented-control.md).

## Notes for agents

- Values can be numbers, with `RadioGroup<number>`.
- A required choice has no default pick.
- `name` goes on the `Field` for a form.
- All Base UI props pass through.

## Anatomy

```text
RadioGroup
├─ RadioGroupItem (0..n)
├─ RadioGroupTileList (0..n)
└─ RadioGroupTile (0..n)
   ├─ RadioGroupTileBox (0..n)
   └─ RadioGroupTileCaption (0..n)
```

## API reference

### RadioGroupTileList

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `TileSize` | "default" | `sm` 56 × 40, `default` 72 × 48, or `lg` 88 × 56 tiles; a tile prop wins. |

### RadioGroupTile

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `size` | `TileSize` |  | `sm`, `default`, or `lg`. Default: the `RadioGroupTileList` size. |

Also takes every prop of Base UI `Radio.Root`: https://base-ui.com/react/components/radio

### RadioGroupTileBox

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### RadioGroupTileCaption

No props of its own: `className`, `children`, and every other prop go to the element it renders.

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| RadioGroup | `radio-group` |  |  |  |
| RadioGroupItem | `radio-group-item` | `data-disabled`, `data-readonly` |  |  |
| RadioGroupTileList | `radio-group-tile-list` |  |  | `hit-area` |
| RadioGroupTile | `radio-group-tile` |  |  |  |
| RadioGroupTileBox | `radio-group-tile-box` |  |  |  |
| RadioGroupTileCaption | `radio-group-tile-caption` |  |  |  |

## Usage

Put each option in a label.

The sample also uses `field`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui/radio-group @gelatin-ui/field
```

```tsx title="billing-choice.tsx"
import { Field, FieldItem, FieldLabel, FieldLegend, FieldSet } from "@/components/ui/field";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";

export function BillingChoice() {
  return (
    <Field>
      <FieldSet render={<RadioGroup defaultValue="yearly" />}>
        <FieldLegend>Billing</FieldLegend>
        <FieldItem>
          <FieldLabel className="font-normal">
            <RadioGroupItem value="monthly" />
            Monthly
          </FieldLabel>
        </FieldItem>
        <FieldItem>
          <FieldLabel className="font-normal">
            <RadioGroupItem value="yearly" />
            Yearly
          </FieldLabel>
        </FieldItem>
      </FieldSet>
    </Field>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/radio-group
```

It adds 9 registry items: 6 files, 1426 lines, and the npm packages `@base-ui/react`, `clsx`, `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Select](https://gelatinui.com/components/select.md)
- [Checkbox](https://gelatinui.com/components/checkbox.md): Pick Checkbox when people can pick any number of options, or one option that is on or off.
- [Segmented Control](https://gelatinui.com/components/segmented-control.md): Pick Segmented Control for a value that sets a view at once, from a few short options in one row.

## Keyboard

| Keys | Action |
| --- | --- |
| Arrow keys | Move the choice and check it. |
| Tab | Leaves the group. |

## Accessibility

The group needs a name: a `FieldLegend` or an `aria-labelledby`.

Each tile has a name: a caption or an `aria-label`.
