For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.1/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.1/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.1/en/components/radio-group.md.
Radio Group presents a short set of mutually exclusive options. Use it when every option can be understood without opening another surface and choosing one value is required to continue or configure the current task.
Give related native radio inputs the same name. Associate every input with a visible label, then give the complete group one accessible name through fieldset and legend or role="radiogroup" and aria-labelledby.
For component-level loading, import the base styles, Radio structure, Field structure, and the A3S visual style in that order. See Installation for CDN and other integrations.
Unchecked and checked are the normal interactive states. Arrow keys move selection inside the focused native group; Tab enters and leaves the group as a single stop. Disabled and invalid appearances are meaningful only when the surrounding content explains the constraint or recovery.
The label names the option. Supporting copy explains the effect of choosing it and remains outside the label so assistive technology does not repeat a long description as the option name.
Use choice cards only when each option needs a title and consequence. data-variant="choice-card" expands the visible option label across the complete field, so the whole card remains one native radio target without invalid nested markup or a second group role. The associated <label> supplies the accessible name; aria-describedby adds the consequence without repeating it as part of that name.
Do not mark a valid preselected value as an error. Start without an error, validate only after an attempted continuation, focus the first option when the group is still empty, and clear stale error semantics as soon as the user recovers or resets the form.
Set dir="rtl" on the group or an ancestor. Native radio keyboard behavior follows the document direction, while the option order remains the meaningful DOM order.
Give the complete group one concise accessible name. Prefer fieldset and legend in forms; otherwise use role="radiogroup" with aria-labelledby or aria-label.
Give every radio a visible label and one stable submitted value. A description belongs in aria-describedby, not inside an excessively long accessible name.
Use one shared name for mutually exclusive options. Do not simulate exclusivity with independent buttons or application-only state.
Keep native arrow-key behavior. Tab enters the selected radio, arrows move and select, and Tab leaves the group; do not create a separate Tab stop for every option.
Do not add role="group" to every option row. The radiogroup or fieldset is the only group boundary.
Set disabled on only the unavailable option and keep its reason visible. If all choices are unavailable, disable the owning form action and explain the blocking condition.
Show an invalid state only after validation runs. Use required, aria-invalid="true", and aria-describedby to connect a recovery-oriented error; clear stale error attributes and text when a valid option is chosen or the form is reset.
Keep the full radio hit target at least 44px on coarse pointers even though the visible indicator remains compact.