Radio group

Exactly one choice from a few, with every option visible. Seeing all the options is the point: use a Select when there are too many to show, and a Checkbox when more than one can be true.

Reach for it

One answer from a few options, all worth showing at once.

Not for

More options than fit comfortably, where a Select or Combobox reads better.

Vertical

The group is a single tab stop and the arrow keys move between options, which is what a keyboard user expects from a set of radios and the expensive part to get right by hand.

Repayment method

Applies to every invoice on this contract.

Horizontal

Suits two short options and nothing longer. Three long labels side by side stop being scannable, and wrap badly on a narrow screen.

Is the debtor VAT registered

Invalid

Inside a Field, the error is announced with the group rather than with one option, because the group is what failed.

Repayment method

Choose a method before continuing

API reference

RadioGroup

PropTypeDefaultDescription
options*RadioOption[]-
data-testidstring-Names the element for a test. Never rendered, never announced.
valuestring-
defaultValuestring-
onValueChange(value: string) => void-
isDisabledboolean-
orientation'vertical' | 'horizontal'-Horizontal suits two short options. Anything longer wraps badly.
namestring-
ariaLabelstring-Names the group when it is used outside a Field. Invisible, like Select's.