Skip to main content

Radio Group

Mutually exclusive selection from a set of options. Only one radio button can be selected at a time with full keyboard navigation and RTL support.

Preview

Installation

Terminalbash

Usage

Reacttsx

Examples

Vertical Layout (Default)

tsx

Horizontal Layout

tsx

With Description Text

Perfect for individuals. $9/month.

For small teams. $29/month.

Custom solutions. Contact sales.

tsx

Disabled Options

tsx

Controlled Component

Selected: option1

tsx

In Forms

tsx

Props

RadioGroup

NameTypeDefaultDescription
value
stringundefinedThe controlled value of the selected radio item
defaultValue
stringundefinedThe default selected value (uncontrolled)
onValueChange
(value: string) => voidundefinedEvent handler called when the value changes
disabled
booleanfalseDisables all radio items in the group
name
stringundefinedThe name for form submission
required
booleanfalseMarks the radio group as required

RadioGroupItem

NameTypeDefaultDescription
value
Required
stringundefinedThe value of the radio item
disabled
booleanfalseDisables this specific radio item

Accessibility

Keyboard Navigation

  • Tab: Move focus to/from radio group
  • Arrow Keys: Navigate between radio options
  • Space: Select focused radio option

Always Use Labels

Always pair radio items with labels. Clicking the label selects the radio button, improving usability.

Group Labeling

Use a heading or label to describe what the radio group is for. This helps screen reader users understand the context.

Screen Readers

Screen readers announce the radio role, the label, whether it's selected, and the group position (e.g., "2 of 3").

RTL Considerations

Radio groups automatically support RTL layout. Radio buttons and labels maintain proper spacing and alignment in both directions.

LTR (English)

RTL (العربية)

Related Components