Skip to Content
ComponentsOptionButton

OptionButton

OptionButton is the Windows 98 radio control. Wrap related options in OptionGroup so they share a name and controlled value.

Props

ExportKey propsDescription
OptionGroupname, value, defaultValue, onValueChangeProvides the controlled or uncontrolled selected value for the group.
OptionButtonvalue, disabled, childrenIndividual radio option selected through its group value.

Examples

Controlled option group

ARIA

OptionButton renders a native radio input and associated label.

Keyboard

Space selects the focused radio option. Arrow keys follow native browser radio-group behavior for options that share the same name.

SSR

Controlled groups should provide the same value during server render and hydration.

Last updated on