Skip to content

RadioGroup

Stable

A set of radio buttons for picking exactly one option, with a visible group name.

Also known as radio, radio buttons, option buttons

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

With descriptions

Response style

Each option has a short hint under its label.

When to use it

Lets a person pick exactly one of a few options, with every option visible at once. Each option can carry a short hint.

Made of: Legend · Radio circle · Label · Hint

Use it for

  • A few options that need explaining, such as a response style.
  • A form choice where the person should see all the options before picking.
  • A choice that is saved later, not applied at once.

Not for

Do and avoid

Delivery
Do. A few choices, all visible, and only one can be picked.
Country
Avoid. A long list of circles pushes everything else off the screen.

Do

  • Start with the most common option picked.
  • Keep labels short and put detail in the hint.
  • Keep the value in your own code and pass it back as value.
  • Use the same shape of label for every option.

Avoid

  • Do not use a RadioGroup for a long list of options. Use a Select.
  • Do not use it for a setting that applies the moment it is picked. Use a SegmentedControl or a Switch.
  • Do not hide the legend if people may not know what the question is.
  • Do not disable the picked option without saying why.

On a phone

  • Each option row is at least 44px tall on touch screens, and the whole row is tappable.
  • The vertical layout is a single column; the horizontal layout wraps onto new lines when the options do not fit.
  • Option labels and descriptions wrap rather than truncate.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started