RadioGroup
RadioGroup
Section titled “RadioGroup”Category: Forms & inputs
<RadioGroup label="Plan" defaultValue="pro"> <Radio value="free">Free</Radio> <Radio value="pro">Pro</Radio> <Radio value="team">Team</Radio></RadioGroup>Install: @helix-ui/core
import { RadioGroup, Radio } from '@helix-ui/core';status: stable · since: 0.1.0
Tags: radio, choice, exclusive
Live playground
Section titled “Live playground”Open the full editor or source on GitHub.
Anatomy
Section titled “Anatomy”( ◉ ) Option A( ◯ ) Option B( ◯ ) Option CLayout
Section titled “Layout”- display —
block - width —
fill - height —
content - intrinsicSize —
vertical stack of options - stackable —
true - fullBleed —
false
Visual
Section titled “Visual”A vertical or horizontal group of radio buttons. Selected radio fills with brand color; label sits to the right.
| Name | Type | Default | Description |
|---|---|---|---|
label |
ReactNode |
— | Group label. |
description |
ReactNode |
— | Helper text. |
errorMessage |
string | (v: ValidationResult) => string |
— | Error text. |
orientation |
'vertical' | 'horizontal' |
vertical |
Layout. |
value |
string |
— | Controlled selected value. |
defaultValue |
string |
— | Uncontrolled initial value. |
isRequired |
boolean |
false |
Required for validation. |
isDisabled |
boolean |
false |
Disables all radios. |
onChange |
(value: string) => void |
— | Change handler. |
- children — Radio components
Tokens used
Section titled “Tokens used”color.bg.action.neutral.default, color.bg.action.brand.default, color.border.strong, color.border.focus, color.brand.200, color.brand.500, color.brand.900, color.text.primary, color.text.secondary, color.text.action.danger, space.2, space.4, font.family.sans, font.size.sm, font.weight.medium
Accessibility
Section titled “Accessibility”Role: radiogroup
Keyboard
| Key | Action |
|---|---|
ArrowDown |
Move to next radio. |
ArrowUp |
Move to previous radio. |
Space |
Selects focused radio. |
Notes
- Hover feedback is gated on
(hover: hover), so a tap does not leave a radio looking permanently hovered. - The translucent bead respects
prefers-reduced-transparency; the selected mark’s scale-in respectsprefers-reduced-motion.
Composes with
Section titled “Composes with”| Component | Relation | Note |
|---|---|---|
Radio |
child |
Default radio child. |
RadioCard |
child |
Card-shaped option. |
Field |
wraps |
RadioGroup has built-in label/description. |
Checkbox |
sibling |
Prompt examples
Section titled “Prompt examples”These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.
simple choice
Section titled “simple choice”“choose A / B / C”
<RadioGroup label="Choose one" value={v} onChange={setV}> <Radio value="a">A</Radio> <Radio value="b">B</Radio> <Radio value="c">C</Radio></RadioGroup>