For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
0
Sponsor

Radio Group

A set of checkable buttons—where no more than one can be checked at a time.

import {
  RadioGroup,
  RadioGroupItem,
} from "@/components/radio-group/radio-group";

export function RadioGroupDemo() {

Installation

$ pnpm dlx shadcn@latest add https://shadcn-cssinjs.vercel.app/r/radio-group.json

Usage

import {
  RadioGroup,
  RadioGroupItem,
} from "@/components/ui/radio-group/radio-group";
<RadioGroup defaultValue="comfortable">
  <RadioGroupItem value="default" />
  <RadioGroupItem value="comfortable" />
</RadioGroup>

Composition

Use the following composition to build a Radio Group:

RadioGroup
├── RadioGroupItem
└── RadioGroupItem

RTL

To enable right-to-left support, see the RTL guide.

"use client";

import { useTranslation } from "@/components/language-selector";
import type { Translations } from "@/components/language-selector";
import {
  RadioGroup,

API Reference

See the Base UI documentation for the full API.