Skip to main content

Installation

Usage

Component API

RadioGroup

Root radio group component built on Radix UI RadioGroup.
Props:
  • defaultValue - Default selected value
  • value - Controlled value
  • onValueChange - Callback when value changes
  • disabled - Disables all radio items
  • orientation - Layout orientation ("horizontal" | "vertical")

RadioGroupItem

Individual radio button with indicator.
Props:
  • value - Unique value for this item
  • id - HTML id for label association
  • disabled - Disables this specific item
  • aria-invalid - Shows error state styling

Implementation

The RadioGroupItem includes a filled circle indicator:

Examples

Basic Radio Group

With Description

Radio items with descriptions:

Disabled State

Disable the entire group or individual items:

Invalid State

Show validation errors:

Controlled Radio Group

Accessibility

The RadioGroup component:
  • Uses role="radiogroup" and role="radio" semantics
  • Supports keyboard navigation (arrow keys)
  • Properly associates labels with inputs
  • Indicates checked and disabled states to screen readers

API Reference

See the Radix UI RadioGroup documentation for complete API reference.