A single-selection button group with card-style radio options, icons, and custom indicators.
import {RadioButtonGroup} from "@heroui-pro/react";
<RadioButtonGroup>
<RadioButtonGroup.Item>
<RadioButtonGroup.ItemIcon /> {/* Optional */}
<RadioButtonGroup.ItemContent>{/* ... */}</RadioButtonGroup.ItemContent>
<RadioButtonGroup.Indicator /> {/* Optional */}
</RadioButtonGroup.Item>
</RadioButtonGroup>;HeroUI follows the BEM methodology to ensure component variants and states are reusable and easy to customize.
The Radio Button Group component uses these CSS classes:
.radio-button-group: Base RadioGroup container with flex layout.radio-button-group__item: Card-like radio button with border and selection ring.radio-button-group__indicator: Positioned top-right indicator (radio dot or custom icon).radio-button-group__item-content: Text/content area wrapping Radio.Content.radio-button-group__item-icon: Leading icon container.radio-button-group--grid: Grid layout mode[data-selected="true"] on .radio-button-group__item (accent ring):focus-visible or [data-focus-visible="true"] on .radio-button-group__item (focus ring):disabled or [aria-disabled="true"] on .radio-button-group__item (reduced opacity)--radio-button-group-item-radius: Border radius of items (default: var(--radius-2xl))The root component. Wraps HeroUI RadioGroup with card-style layout.
| Prop | Type | Default | Description |
|---|---|---|---|
layout | 'flex' | 'grid' | 'flex' | Layout mode for items |
Also supports all HeroUI RadioGroup props.
A selectable card wrapping HeroUI Radio. Supports render prop children for accessing selection state.
Also supports all HeroUI Radio props.
Selection indicator positioned at the top-right of the item.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Custom indicator icon (shown when selected) |
Also supports all native span HTML attributes.
Content area for title and description text. Wraps HeroUI Radio.Content.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Content elements |
Also supports all native div HTML attributes.
Leading icon container.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Icon element |
Also supports all native div HTML attributes.
Resources