---
title: "Radio Group"
description: "A set of radio buttons for choosing one option, with arrow-key navigation and form integration. Built on Base UI."
plan: Free
docs: https://ui.edbn.me/docs/components/radio-group
---

# Radio Group

A set of radio buttons for choosing one option, with arrow-key navigation and form integration. Built on Base UI.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/radio-group.json
```

## Dependencies
- npm: @base-ui/react@^1.8.0
- edbn: edbn-base

## Usage

```tsx examples/radio-group-basic.tsx
"use client";
import { Label } from "@/components/ui/label";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";

export default function RadioGroupBasicPreview() {
  return (
    <RadioGroup defaultValue="email" className="w-fit">
      <div className="flex items-center gap-2">
        <RadioGroupItem value="email" id="radio-email" />
        <Label htmlFor="radio-email">Email</Label>
      </div>
      <div className="flex items-center gap-2">
        <RadioGroupItem value="sms" id="radio-sms" />
        <Label htmlFor="radio-sms">SMS</Label>
      </div>
    </RadioGroup>
  );
}
```

## Files
- components/ui/radio-group.tsx (39 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
