Radio Groupv0.6.0Ready for Production
A set of checkable buttons where no more than one can be checked at a time, providing single-choice selection in forms and interfaces.
Prefer AI-assisted development?
Catalyst Radio Group extends Radix UI's Radio Group primitive with built-in CVA variants, design tokens, and accessible keyboard navigation — giving you a production-ready single-choice selector with zero configuration.
Installation
npm install @pmi/catalyst-radio-groupimport { RadioGroupRoot, RadioGroupItem, RadioGroupIndicator } from '@pmi/catalyst-radio-group';Variants
Danger
Apply the danger prop to RadioGroupRoot to show an error state across the entire group.
Disabled
Pass disabled to RadioGroupRoot to prevent interaction on all radio items.
Sizes
Three sizes are available — sm, md (default), and lg — controlled via the size prop on RadioGroupRoot.
Common Patterns
With Label
Use aria-labelledby on RadioGroupRoot to associate a visible heading with the group for screen readers.
Notification Preferences
With Helper Text
Pair with the HelperText component to provide additional context below the group.
Delivery Method
With Helper Text (Danger)
Combine danger helper text with a validation-failed state to surface error messages clearly.
Payment Method
Form with Validation
Use controlled state alongside danger and HelperText to build a validated form field.
Product Variant
The product variant is an optional styling package that provides smaller radio indicator sizes optimized for data-rich application interfaces. All examples above apply — simply swap the import.
npm install @pmi/catalyst-radio-groupimport { RadioGroupRoot, RadioGroupItem, RadioGroupIndicator } from '@pmi/catalyst-radio-group';API Reference
Radio Group is a compound component built on Radix UI primitives. The sections below summarize the shared API surface for each part of the component.
RadioGroupRoot
The container component that manages state, size, and danger context for all child items.
Accepts all standard Radix Radio Group Root props and forwards ref to the underlying element.
Prop
Type
RadioGroupItem
An individual radio button within the group. Must be a descendant of RadioGroupRoot.
Accepts all standard Radix Radio Group Item props and forwards ref.
Prop
Type
RadioGroupIndicator
Renders the filled dot inside the radio item when it is in the checked state.
Accepts all standard Radix Radio Group Indicator props and forwards ref.
Prop
Type
Accessibility
Radio Group is designed to meet WCAG 2.2 AA standards. The sections below document keyboard behavior and ARIA semantics.
Keyboard Interactions
| Key | Action |
|---|---|
Arrow Down / Arrow Right | Moves focus to the next radio item and selects it |
Arrow Up / Arrow Left | Moves focus to the previous radio item and selects it |
Space | Selects the focused radio item when entering the group unselected |
Tab | Moves focus out of the radio group to the next focusable element |
Shift + Tab | Moves focus out of the radio group to the previous focusable element |
ARIA
RadioGroupRootrenders withrole="radiogroup". Always providearia-labeloraria-labelledbyto name the group for screen readers.- Each
RadioGroupItemrenders withrole="radio"andaria-checked("true"/"false"). - Disabled items receive
aria-disabled="true"anddata-disabled, preventing pointer interaction automatically viadata-[disabled]:pointer-events-none. HelperTextwith details or error messages associated with the radio group should have anidthat matches thearia-describedbyof theRadioGroupRoot. Use an appropriaterole("status"/"alert") oraria-livepattern for announcing dynamically displayed success/error messages.
See the Radix Radio Group accessibility docs for inherited baseline behavior.
Choosing the Right Component
Use Radio Group when users must pick exactly one option from a small set of visible choices. Reach for a different component when:
| If you need… | Use instead |
|---|---|
| Multiple simultaneous selections | Checkbox |
| Selecting from a long list without showing all options | Select |
| Visually rich card-based single selection | Radio Cards |
Related
File Upload
A flexible file upload component with drag-and-drop support, file validation, progress tracking, and customizable trigger coloration built for product applications.
Radio
A styled radio input with size variants and danger states, built on the native HTML radio element with CVA-based styling and Radix Slot composition.