Radio

v10.3.6Edit this page

Lets a user choose from a list of options where only a single option can be selected.

Usage

Loading...

Loading examples...

Props

<RadioGroup>

A high-level input with a props interface similar to <Select> that renders multiple radio options.

Inline Radios

RadioGroup, by default, has each radio option and label on its own line and inside a gray block. This makes it easy for the user to scan the options and make the right selection. When there are only two simple options (like "Yes" and "No"), you can save space by having both options rendered inline on one line by using the inline prop.

Label for <RadioGroup>

You usually want a label for RadioGroup. Use InputGroup to attach a label to RadioGroup.

<RadioOption>

A single radio option and label. Like RadioGroup, the option can be rendered in a block or inline. Props are passed down to the underlying <input>.

Similarity with Checkboxes

This component is very similar (both in design and props) to @nerdwallet/react-checkbox. Checkboxes should be used when the user can select one or more options.

Maintainers

This component is maintained by the FEI team.

See Also