Radio
Radio lets a person pick exactly one option from a short list.
Use a Radio when a person must pick exactly one option from a short list, such as a plan or a backup schedule. Every Radio belongs to a RadioGroup, which holds the chosen value, and a Radio is checked when its value matches the group's.
For neighbouring cases, use a Checkbox when a person can pick several options or turn one option on and off, and a Switch for a setting that takes effect at once. A Select suits a long list, and a segmented control suits two to five short labels that change a view in place.
A Radio is always a circle, whatever corner setting your theme uses, because a square radio would look like a checkbox. It is neutral when off and uses your app's accent colour when on.
At each size, a Radio is exactly one line of text tall and matches a Checkbox, while its pressable area extends to the height of a Button at the same size. Inside a Field it uses the Field's size, although a size set on the Radio still wins.
The label is a separate element beside the Radio. The simplest way to connect them is a FieldItem, which needs no id. You can also wrap the Radio and its words in a <label>, or give the Radio an id and point a label at it with htmlFor. In every case, pressing the label checks the Radio.
Props
Generated from the types. It lists what this component DECLARES: a prop that arrives from a shared type or from the platform is real and is not repeated here.
| Prop | Type | What it does |
|---|---|---|
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
size? | "1" | "2" | "3" | "4" | The size step of the radio, from 1 to 4. |
toneandemphasis— Like a Checkbox, a Radio is always neutral when off and accent-coloured when on, so a checked option reads the same everywhere in your app.readOnly— HTML has no read-only radio button, so there is no standard behaviour to follow. To show a value that cannot change, disable the radio and explain why in a description.