Radio Group

A set of mutually exclusive options where exactly one can be selected.
Stable
Web
iOS
Android
@advui/core
Source

Plans

Up to 3 projects
Unlimited projects
Shared workspaces

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { Field, RadioGroup } from '@advui/core'

<Field label="Plan">
  <RadioGroup value={plan} onValueChange={setPlan}>
    <RadioGroup.Item value="free" label="Free" description="Up to 3 projects" />
    <RadioGroup.Item value="pro" label="Pro" />
  </RadioGroup>
</Field>

API reference

RadioGroup

PropTypeDefaultDescription
valuestring—Selected value, when you control it.
defaultValuestring—Starting `value` when uncontrolled.
onValueChange(value: string) => void—Called when the selection changes.
gapSpaceTokens'3'Space between items.
orientation'vertical' | 'horizontal''vertical'Arrow-key direction and layout.
disabledboolean—Disables all items.
namestring—Field name when a native form is submitted.Web only.
requiredboolean—The native form will not submit until an option is picked.Web only.

RadioGroup.Item

PropTypeDefaultDescription
value requiredstring—The option value.
labelReactNode—Text beside the radio; pressing it selects the item. Without one, give the item an `aria-label`, or an `id` and your own `Label htmlFor`.
descriptionReactNode—Smaller text under the label, linked as the radio’s description.
idstring—Link to a Label with the same `htmlFor`.
size'sm' | 'md''md'16 or 20px.
disabledboolean—Disables this item.

Accessibility

  • Implements the WAI-ARIA radio group: role="radiogroup" with role="radio" items and aria-checked.
  • Only the selected item is in the tab order; arrow keys move and select (roving focus).
  • Name the group with aria-label or aria-labelledby; inside a Field, the field’s label names it.
  • An item’s label names its radio and its description is linked through aria-describedby.
Keyboard interactions
KeyAction
TabMoves focus into the group (to the selected item).
Arrow keysMoves focus and selection between items.
SpaceSelects the focused item.

Platform notes

iOS
VoiceOver has no group names, so each item reads the group’s name and help text as its hint, after its own description. A labelled item’s visible label and description are hidden from VoiceOver, since the radio already reads them.
Android
TalkBack has no group names, so each item reads the group’s name and help text as its hint, after its own description. A labelled item’s visible label and description are hidden from TalkBack, since the radio already reads them.
Since v0.1.0Last updated Nov 2, 2026Edit this page on GitHub