Skip to content

RadioGroup

A controlled radio group for single-value selection.

Notification preference
Best for detailed updates.
<RadioGroup
label="Notification preference"
description="Choose one delivery channel."
value="email"
/>
Notification preference
Best for detailed updates.
<RadioGroup
label="Notification preference"
description="Choose one delivery channel."
value="email"
orientation="horizontal"
/>
Notification preference
Best for detailed updates.
<RadioGroup
label="Notification preference"
description="Choose one delivery channel."
value="email"
size="sm"
/>
Notification preference
Best for detailed updates.
<RadioGroup
label="Notification preference"
description="Choose one delivery channel."
value="email"
size="lg"
/>
Notification preference
Best for detailed updates.
<RadioGroup
label="Notification preference"
description="Choose one delivery channel."
value="email"
isDisabled
/>
Notification preference
<ItemDisabledStory {...args} />
Notification preferenceRequired
Best for detailed updates.
<RadioGroup
label="Notification preference"
description="Choose one delivery channel."
value="email"
isRequired
/>
Notification preferenceOptional
Best for detailed updates.
<RadioGroup
label="Notification preference"
description="Choose one delivery channel."
value="email"
isOptional
/>
Notification preference
Best for detailed updates.
<RadioGroup
label="Notification preference"
description="Choose one delivery channel."
value="email"
status={{message: 'Select a notification preference.', type: 'error'}}
/>
Notification preference
Recommended
<WithEndContentStory {...args} />
Notification preference
<WithIconsStory {...args} />
Notification preference
Best for detailed updates.
SMS may incur carrier charges.
<RadioGroup
label="Notification preference"
description="Choose one delivery channel."
value="email"
status={{message: 'SMS may incur carrier charges.', type: 'warning'}}
/>
Notification preference
Best for detailed updates.
Preference saved.
<RadioGroup
label="Notification preference"
description="Choose one delivery channel."
value="email"
status={{message: 'Preference saved.', type: 'success'}}
/>

A controlled radio group for single-value selection.

When isOptional: false, isRequired: false

PropTypeDefaultDescription
children*ReactNodeRadio list items to render.
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the field root.
descriptionReactNodeSupporting text displayed below the label.
isDisabledbooleanfalseWhether all radio items are disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
label*stringLabel text for the radio group.
labelTooltipReactNodeTooltip content shown next to the label.
onChange*(value: string) => voidCallback fired when the selected value changes. Memoize with useCallback to avoid unnecessary re-renders of radio items.
orientation"horizontal" | "vertical"'vertical'Layout direction of the radio items.
refRef<HTMLDivElement>Ref forwarded to the field root.
size"sm" | "md" | "lg"'md'Size of the radio controls.
statusInputStatusValidation status displayed below the group.
styleCSSPropertiesInline styles applied to the field root.
value*stringThe currently selected value.
isOptionalfalse
isRequiredfalse

When isOptional: true, isRequired: false

PropTypeDefaultDescription
children*ReactNodeRadio list items to render.
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the field root.
descriptionReactNodeSupporting text displayed below the label.
isDisabledbooleanfalseWhether all radio items are disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
label*stringLabel text for the radio group.
labelTooltipReactNodeTooltip content shown next to the label.
onChange*(value: string) => voidCallback fired when the selected value changes. Memoize with useCallback to avoid unnecessary re-renders of radio items.
orientation"horizontal" | "vertical"'vertical'Layout direction of the radio items.
refRef<HTMLDivElement>Ref forwarded to the field root.
size"sm" | "md" | "lg"'md'Size of the radio controls.
statusInputStatusValidation status displayed below the group.
styleCSSPropertiesInline styles applied to the field root.
value*stringThe currently selected value.
isOptional*true
isRequiredfalse

When isOptional: false, isRequired: true

PropTypeDefaultDescription
children*ReactNodeRadio list items to render.
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the field root.
descriptionReactNodeSupporting text displayed below the label.
isDisabledbooleanfalseWhether all radio items are disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
label*stringLabel text for the radio group.
labelTooltipReactNodeTooltip content shown next to the label.
onChange*(value: string) => voidCallback fired when the selected value changes. Memoize with useCallback to avoid unnecessary re-renders of radio items.
orientation"horizontal" | "vertical"'vertical'Layout direction of the radio items.
refRef<HTMLDivElement>Ref forwarded to the field root.
size"sm" | "md" | "lg"'md'Size of the radio controls.
statusInputStatusValidation status displayed below the group.
styleCSSPropertiesInline styles applied to the field root.
value*stringThe currently selected value.
isOptionalfalse
isRequired*true

An individual radio option within a `RadioGroup`.

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the item root.
data-testidstringTest ID applied to the item root.
descriptionReactNodeSupporting text displayed below the item label.
endContentReactNodeContent rendered after the label and description.
isDisabledbooleanfalseWhether this radio item is disabled.
label*stringLabel text for the radio item.
refRef<HTMLDivElement>Ref forwarded to the item root.
startContentReactNodeContent rendered after the radio control and before the label.
styleCSSPropertiesInline styles applied to the item root.
value*stringValue represented by this radio item.