RoadieRoadie
  • Home
  • Brand
  • Foundations
  • Content
  • Tokens
  • Components
  • Charts
  • Widgets
  • Appearance
HomeBrandFoundations
Appearance

Components

  • Navigation

    • Breadcrumb
    • LinkBeta
    • NavigatorAlpha
    • Steps
    • Tabs
  • Layout

    • Accordion
    • CollapsibleBeta
    • PaneAlpha
    • ScrollArea
    • Separator
  • Actions

    • Button
    • IconButton
    • ToggleBeta
    • Toggle groupBeta
    • ToolbarBeta
  • Fields

    • EditorAlpha
    • Field
    • Fieldset
    • Input
    • Label
    • Number fieldBeta
    • OTP fieldBeta
    • Query fieldAlpha
    • Textarea
  • Choices

    • Autocomplete
    • CheckboxBeta
    • Combobox
    • Radio group
    • Select
    • SliderBeta
    • SwitchBeta
  • Date and time

    • CalendarBeta
    • CalendarTile
    • Countdown
    • Dashboard periodBeta
    • Date fieldBeta
    • Date pickerBeta
    • Date range pickerBeta
    • DateTime
    • Duration
    • Time fieldBeta
  • Collections

    • Card
    • Carousel
    • DataTableBeta
    • ListAlpha
    • Marquee
    • RecordGridAlpha
    • RecordTableAlpha
    • SortableAlpha
    • TableBeta
  • Overlays

    • Dialog
    • Drawer
    • MenuBeta
    • Popover
    • ToastBeta
    • Tooltip
  • Status

    • Badge
    • CalloutBeta
    • DeltaBeta
    • Empty state
    • MeterBeta
    • ProgressBeta
    • SkeletonBeta
    • SparklineBeta
    • StatTileBeta
  • Media & brand

    • AvatarBeta
    • Icon Tile
    • Image
    • Logo
    • PatternBeta
    • QR codeBeta
    • SpotIllustration
  • Text

    • Code
    • Highlight
    • KbdBeta
    • Mark
    • Prose

Radio group

Status
Stable
Added
Components 2.0.08 Apr 2026
Updated
Components 2.17.024 Oct 2026
Docs updated
23 Oct 2026

A group of radio buttons for selecting one option from a set.

Import

import { RadioGroup } from '@oztix/roadie-components/radio-group'

Examples

Default

<RadioGroup>
<RadioGroup.Item value='email' label='Email' />
<RadioGroup.Item value='phone' label='Phone' />
<RadioGroup.Item value='post' label='Post' />
</RadioGroup>

With Field

Wrap RadioGroup in Field for consistent layout, labels, and error handling.

<Field required>
<Field.Label showIndicator>Contact method</Field.Label>
<RadioGroup>
<RadioGroup.Item value='email' label='Email' />
<RadioGroup.Item value='phone' label='Phone' />
<RadioGroup.Item value='post' label='Post' />

With standalone label

RadioGroup also has its own RadioGroup.Label for standalone usage without a Field wrapper.

<RadioGroup required>
<RadioGroup.Label showIndicator>Contact method</RadioGroup.Label>
<RadioGroup.Item value='email' label='Email' />
<RadioGroup.Item value='phone' label='Phone' />
<RadioGroup.Item value='post' label='Post' />
</RadioGroup>

Variants

Horizontal direction

<RadioGroup direction='horizontal'>
<RadioGroup.Item value='small' label='Small' />
<RadioGroup.Item value='medium' label='Medium' />
<RadioGroup.Item value='large' label='Large' />
</RadioGroup>

Emphasis

Use the emphasis prop on the Root to control the visual weight of all items.

Normal

<RadioGroup emphasis='normal'>
<RadioGroup.Item value='standard' label='Standard delivery' />
<RadioGroup.Item value='express' label='Express delivery' />
<RadioGroup.Item value='overnight' label='Overnight delivery' />
</RadioGroup>

Sizes

md is the default. Use sm in dense lists, such as a filter sidebar, and lg where the choice is the main thing on the screen. Set it on the Root. With emphasis='normal', it sizes the circle only.

{/* Small */}
<RadioGroup size='sm' defaultValue='a'>
<RadioGroup.Item value='a' label='Option A' />
</RadioGroup>
{/* Medium */}
<RadioGroup size='md' defaultValue='a'>

Trailing

trailing puts a count, Badge, or value at the end of an item. It isn't part of the radio's name, so screen readers announce the label alone.

<RadioGroup size='sm' defaultValue='upcoming'>
<RadioGroup.Label>Event dates</RadioGroup.Label>
<RadioGroup.Item value='upcoming' label='Upcoming' trailing='265' />
<RadioGroup.Item value='next-7-days' label='Next 7 days' trailing='18' />
<RadioGroup.Item value='next-30-days' label='Next 30 days' trailing='74' />
</RadioGroup>

States

{/* Default */}
<RadioGroup>
<RadioGroup.Item value='a' label='Option A' />
<RadioGroup.Item value='b' label='Option B' />
</RadioGroup>
{/* Invalid */}

Accessibility

  • Keyboard: Arrow Up/Arrow Down moves between radio items. Space selects the focused item. Base UI manages roving tabindex.
  • ARIA: Base UI Radio sets role="radiogroup" on the root and role="radio" with aria-checked on each item automatically. An invalid group, from invalid or its Field, sets aria-invalid on the radiogroup.
  • Grouping: Wrap in a Fieldset with a Legend to provide a group label for screen readers.

API reference

RadioGroup

Base UI
disabledboolean

Whether the component should ignore user interaction.

Defaults to false.

readOnlyboolean

Whether the user should be unable to select a different radio button in the group.

Defaults to false.

requiredboolean

Whether the user must choose a value before submitting a form.

Defaults to false.

namestring

Identifies the field when a form is submitted.

formstring

Identifies the form that owns the radio inputs. Useful when the radio group is rendered outside the form.

valueany

The controlled value of the radio item that should be currently selected. To render an uncontrolled radio group, use the `defaultValue` prop instead.

defaultValueany

The uncontrolled value of the radio button that should be initially selected. To render a controlled radio group, use the `value` prop instead.

onValueChange((value: any, eventDetails: { reason: "none"; event: Event; cancel: () => void; allowPropagation: () => void; isCanceled: boolean; isPropagationAllowed: boolean; trigger: Element; }) => void)

Callback fired when the value changes.

inputRefRef<HTMLInputElement>

A ref to access the hidden input element.

classNamestring | ((state: RadioGroupState) => string)

CSS class applied to the element, or a function that returns a class based on the component's state.

direction"horizontal" | "vertical" | null
size"sm" | "md" | "lg"

Sets every item's size.

Defaults to 'md'.

emphasis"subtler" | "normal"
invalidboolean

RadioGroup.ErrorText

No additional props. It forwards all standard HTML attributes to the underlying element.

RadioGroup.HelperText

No additional props. It forwards all standard HTML attributes to the underlying element.

RadioGroup.Item

Base UI
classNamestring | ((state: RadioRootState) => string)

CSS class applied to the element, or a function that returns a class based on the component's state.

labelReactNode

Names the radio. The whole row becomes the click target.

descriptionReactNode

A line of help under the label, read as the radio's description.

trailingReactNode

End of the row: a count, `Badge`, or value. Left out of the accessible name.

Inherited from RadioRootProps

valueany
Required

The unique identifying value of the radio in a group.

disabledboolean

Whether the component should ignore user interaction.

requiredboolean

Whether the user must choose a value before submitting a form.

readOnlyboolean

Whether the user should be unable to select the radio button.

inputRefRef<HTMLInputElement>

A ref to access the hidden input element.

Inherited from NonNativeButtonProps

nativeButtonboolean

Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `true` if the rendered element is a native button.

Defaults to false.

RadioGroup.Label

showIndicatorboolean
Previous page← ComboboxNext pageSelect →