Radio API

API reference docs for theRadiocomponent. For examples and details on the usage of this component, visit the component demo page.

Props

Prop

Type

Description

Default

label

ReactNode

Label for the radio button, typically required for accessibility purposes.

_

isDisabled?

boolean

When true, the radio will be announced as disabled to screen readers and styled to signify this.

false

size?

'standard'| 'large'

The size of the radio.

standard

value?

string

The value of the radio button.

_

checked?

boolean

Indicates whether the radio is checked, used in controlled components.

_

id?

string

A unique ID for the radio button.

_

name?

boolean

The name attribute of the radio, useful for grouping in forms.

_

description?

ReactNode

Description text displayed alongside the radio, providing additional context.

_

aria-describedby?

string

Defines the ID of the element that provides additional information about the radio for accessibility purposes.

_

onBlur?

function

Event handler for when the radio loses focus.

_

onClick?

function

Event handler for when the radio is clicked.

_

onChange?

function

Function called when the radio value changes.

_

Note: For id and aria-describedBy if a value is provided, the IDs will be merged. Otherwise, React.useId will be used to generate unique IDs to associate the labels appropriately.