A composable group of radio buttons for single-selection. Manages shared state across all items.

import RadioGroup from "@radui/ui/RadioGroup"
Example
React
"use client" import RadioGroup from "@radui/ui/RadioGroup" const options = [ { id: 'default', value: 'default', label: 'Default' }, { id: 'comfortable', value: 'comfortable', label: 'Comfortable' }, { id: 'compact', value: 'compact', label: 'Compact' } ] const RadioGroupExample = () => { return ( <RadioGroup.Root defaultValue="comfortable" aria-label="Density"> {options.map((option) => ( <RadioGroup.Label key={option.id}> <RadioGroup.Item value={option.value}> <RadioGroup.Indicator /> </RadioGroup.Item> {option.label} </RadioGroup.Label> ))} </RadioGroup.Root> ) } export default RadioGroupExample
  • One tab stop for the group; arrow keys move the selection, Home and End jump
  • Controlled with value and onValueChange, or uncontrolled with defaultValue
  • A hidden input submits the value under name, honours required and resets with the form
  • readOnly shows the selection without letting it change; works inside Field.Root

Import all parts of the component and piece them together.

React
import RadioGroup from "@radui/ui/RadioGroup" export default () => { return ( <RadioGroup.Root aria-label="Group"> <RadioGroup.Label> <RadioGroup.Item value="option"> <RadioGroup.Indicator /> </RadioGroup.Item> Label </RadioGroup.Label> </RadioGroup.Root> ) }

The root RadioGroup component.

PropTypeDefault
name
string—
value
string—
defaultValue
string—
disabled
booleanfalse
loop
booleantrue
onValueChange
function—
readOnly
booleanfalse
form
string—
inputRef
Ref<HTMLInputElement>—
ShortcutDescription
Tab

Moves focus into or out of the radio group.

ArrowRight

Moves focus to the next enabled radio item and selects it.

ArrowDown

Moves focus to the next enabled radio item and selects it.

ArrowLeft

Moves focus to the previous enabled radio item and selects it.

ArrowUp

Moves focus to the previous enabled radio item and selects it.

Space

Selects the focused radio item.

ReferenceWhat Rad UI follows
Radio group pattern

Uses grouped radio semantics for a single required or optional selection among related items.