A composable group of radio buttons for single-selection. Manages shared state across all items.
import RadioGroup from "@radui/ui/RadioGroup"- 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.
The root RadioGroup component.
| Prop | Type | Default |
|---|---|---|
name | string | — |
value | string | — |
defaultValue | string | — |
disabled | boolean | false |
loop | boolean | true |
onValueChange | function | — |
readOnly | boolean | false |
form | string | — |
inputRef | Ref<HTMLInputElement> | — |
| Shortcut | Description |
|---|---|
| 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. |
| Reference | What Rad UI follows |
|---|---|
| Radio group pattern | Uses grouped radio semantics for a single required or optional selection among related items. |