Skip to content

RadioGroup

RadioGroup

<RadioGroup label="Plan" defaultValue="pro">
<Radio value="free">Free</Radio>
<Radio value="pro">Pro</Radio>
<Radio value="team">Team</Radio>
</RadioGroup>

Install: @helixui/core

import { RadioGroup, Radio } from '@helixui/core'

status: stable · since: 0.1.0

Tags: radio, choice, exclusive

Anatomy

( ◉ ) Option A
( ◯ ) Option B
( ◯ ) Option C

Layout

  • displayblock
  • widthfill
  • heightcontent
  • intrinsicSizevertical stack of options
  • stackabletrue
  • fullBleedfalse

Visual

A vertical or horizontal group of radio buttons. Selected radio fills with brand color; label sits to the right.

Props

NameTypeDefaultDescription
labelReactNodeGroup label.
descriptionReactNodeHelper text.
errorMessagestring | (v: ValidationResult) => stringError text.
orientation'vertical' | 'horizontal'verticalLayout.
valuestringControlled selected value.
defaultValuestringUncontrolled initial value.
isRequiredbooleanfalseRequired for validation.
isDisabledbooleanfalseDisables all radios.
onChange(value: string) => voidChange handler.

Slots

  • children — Radio components

Tokens used

color.bg.surface.default, color.bg.action.brand.default, color.border.strong, color.border.focus, color.text.primary, color.text.secondary, color.text.action.danger, space.2, space.4, font.family.sans, font.size.sm, font.weight.medium

Accessibility

Role: radiogroup

Keyboard

KeyAction
ArrowDownMove to next radio.
ArrowUpMove to previous radio.
SpaceSelects focused radio.

Composes with

ComponentRelationNote
RadiochildDefault radio child.
RadioCardchildCard-shaped option.
FieldwrapsRadioGroup has built-in label/description.
Checkboxsibling

Prompt examples

These are the AI prompt → JSX mappings used by the helixui prompt DSL and integrations like Cursor / Claude Code.

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>