Rebar UI

1.0

imitation

RadioGroup

A labelled set of radios.

PlanGroup with legend and cards
Plan
£0
£12
£48
Horizontal
Error
Colour

Choose a colour.

Disabled

In context

Export dialogOne choice, then one action

Export rota

Format

Native appearance

NativeRadioGroup appearance="native": each Radio is the browser radio, grouped by name.

RadioGroup props

PropTypeRequiredDefault
asChildboolean | undefinedNo—
appearance"custom" | "native" | undefinedNocustom

Radio props

PropTypeRequiredDefault
invalidboolean | undefinedNo—
bionicboolean | undefinedNo—
bionicOptionsBionicOptions | undefinedNo—

Accessibility

A real Radix role="radiogroup": arrow keys move between options, Space selects, each Radio is a real <label>. Give the group an aria-label or aria-labelledby pointing at its legend.

data-rebar-* attributes

data-rebar-component="radio-group" on the group, "radio" on each item; data-rebar-part="indicator", "label"; Radix sets data-state.

Migrating to Ant Design

AntD's Radio.Group/Radio take the same value/onChange (event-based) shape: a close, low-risk rename.