Angular playground

Nova v3.37.0

Preview

Angular

Radio

nv-fieldradio

One option from a small set of mutually exclusive choices.

Live demo

Use radios when people must choose exactly one option from a small set and should see every option at once. For several selections, use checkboxes; for a long list, use a select.

Anatomy

A radio with three callouts: 1 marks the round control, 2 the label Label next to it, and 3 the description below the label.

The parts of a radio.
  1. Radio shows whether the option is selected.
  2. Label names the option.
  3. Description (optional) adds detail about the option.

Groups

Radios with the same name form a group: selecting one clears the others. Each radio reports its own checked state, so an application stores the selected option and sets checked on each radio from it. Wrap a group in a fieldset with a legend that names the choice, and give each group a unique name on the page.

States

Radios are selected or unselected, with built-in hover and focus styles. Set labelPlacement to before to put the label first. A disabled option cannot be chosen. Set error with an errorDescription when a required choice is missing: the control turns red and the message explains the correction.

The design also depicts a read-only state. This version of nv-fieldradio has no readonly property; use disabled when an option must not change, or present the chosen value as text when editing is unavailable.

unselected
selected
disabled
labelPlacement="before"
error

Themes

The design includes Spark and Ocean appearances. Use the page's theme and mode controls to compare the live examples; retain the same labels, states and validation messages in each theme.

Guidelines

  • Give each option a short, clear label, and order options logically.
  • Don't use radios for actions; they select values.
  • Preselect a sensible default unless people must make a deliberate choice.
DoOrder options logically and preselect a sensible default.
Don'tAvoid radios for actions; they select values.

Sources