Skip to content
ComponentsMarkdown

Radio

Mutually exclusive choice controls built on Radix RadioGroup. RadioGroup renders a <fieldset> and <legend> with arrow-key navigation across Radio items.

Live example

Default appearance

Active selection: dark

Horizontal sizes

Props

RadioGroup props

PropTypeDefaultDescription
labelReactNoderequiredGroup heading rendered inside <legend>.
descriptionReactNode—Helper text wired into aria-describedby.
errorReactNode—Error text rendered with role="alert" and wired to aria-invalid.
orientation"vertical" | "horizontal""vertical"Stack direction and arrow-key orientation.
size"xs" | "sm" | "md" | "lg""md"Default control size inherited by child Radio items.
namestring—Submits the selected value in native HTML forms via FormData.

Radio props

PropTypeDefaultDescription
valuestringrequiredUnique value submitted when this option is selected.
labelReactNode—Inline label rendered to the right of the radio circle; makes the entire row clickable.
descriptionReactNode—Optional helper text wired into aria-describedby.
size"xs" | "sm" | "md" | "lg"Group sizeRadio circle size (--control-icon-*) and minimum clickable row height (--control-height-*).
disabledbooleanfalseDisables selection using step 3 background and step 8 text without opacity.

Sizes and tokens

Tier / RoleTokenValue
xs--control-icon-xs / --control-height-xs16px circle · 8px dot · 24px row min-height
sm--control-icon-sm / --control-height-sm16px circle · 8px dot · 32px row min-height
md--control-icon-md / --control-height-md20px circle · 8px dot · 40px row min-height
lg--control-icon-lg / --control-height-lg24px circle · 12px dot · 48px row min-height
Unchecked / Checked--input / --primaryStep 8 border · 2px brand step 9 ring + solid dot when selected

States

Billing interval
Locked plan

Code

import { Radio, RadioGroup } from "@freshgemui/monoplinth";

export function Example() {
  return (
    <RadioGroup name="plan" label="Plan" defaultValue="pro" required>
      <Radio value="free" label="Free" description="Up to 3 workspaces." />
      <Radio value="pro" label="Pro" description="Unlimited workspaces." />
    </RadioGroup>
  );
}

Do and don't

Do: Keep radio options concise and mutually exclusive
Use RadioGroup when the user must pick exactly one option from a small, visible list.
Don't: Use Radio for independent toggles or long lists
Use Checkbox or Switch for independent boolean settings, and Select when there are more than five options.

Accessibility

  • RadioGroup renders a <fieldset> + <legend> with role="radiogroup", wiring description and error via aria-describedby and aria-invalid.
  • Arrow keys (ArrowUp, ArrowDown, ArrowLeft, ArrowRight) move focus and selection across enabled options; Tab enters and leaves the group as a single stop.
  • Every Radio row enforces --control-height-* minimum target height (≥ 24px).

Rationale

Sharing ChoiceRow with Checkbox and Switch keeps row alignment, target sizing, and description wiring uniform across all choice controls.