This page as markdown: /radio.md · Index for agents: /llms.txt · Everything in one file: /llms-full.txt

Radio

Status: stable

Single-select control over Base UI RadioGroup + Radio (roving focus, arrow-key nav, ARIA radiogroup wiring, form integration). RadioGroup + Radio.

Keywords: radio, radio group, single choice, form control

Usage

Use Radio when a user must choose exactly one option from a visible set.

Best practices

Anatomy

Part Required Description
RadioGroup yes The grouped set that manages one selected value.
Radio yes One selectable option in the group.

Subcomponents

Name Type Description
RadioGroup Base UI RadioGroup props (value, defaultValue, onValueChange, name, disabled, readOnly, required) + className The group container that wraps Radio items and shares selection state across them. Controlled via value + onValueChange; uncontrolled via defaultValue. Lays its Radio items out in a vertical stack.

Props

Name Type Default Description
Radio Base UI Radio.Root props (value, disabled, readOnly, required) + className — A single radio button. value pairs it with the group's selected value. Renders a native button with radio semantics, the ring and an inner Indicator dot. A custom non-button render must also set nativeButton={false}.

Tokens used

input, card, primary, ring

Motion

Accessibility

Related

Examples

Basic

import { Field, Fieldset, FieldsetContent, FieldsetLegend, Radio, RadioGroup } from "@sableui/react"

<Fieldset>
	<FieldsetLegend>Post type</FieldsetLegend>
	<FieldsetContent>
		<RadioGroup defaultValue="standard">
			<Field label="Standard" orientation="horizontal"><Radio value="standard" /></Field>
			<Field label="Poll" orientation="horizontal"><Radio value="poll" /></Field>
		</RadioGroup>
	</FieldsetContent>
</Fieldset>

With a disabled option

import { Field, Fieldset, FieldsetContent, FieldsetLegend, Radio, RadioGroup } from "@sableui/react"

<Fieldset>
	<FieldsetLegend>Post type</FieldsetLegend>
	<FieldsetContent>
		<RadioGroup defaultValue="standard">
			<Field label="Standard" orientation="horizontal"><Radio value="standard" /></Field>
			<Field label="Poll" orientation="horizontal" disabled><Radio value="poll" /></Field>
		</RadioGroup>
	</FieldsetContent>
</Fieldset>