Radio Group

A set of options where only one can be selected.

Density

Installation

  1. Add the registryOnce per project
  2. Add radio-group

Usage

Pair each item with a label in a FieldItem, and name the group with a FieldSet and FieldLegend.

Without a visible legend, give the RadioGroup an aria-label instead.

Composition

Examples

With descriptions

Wrap the label in a FieldContent with a FieldDescription when an option needs explaining.

Visibility

Anyone with the link can view it.

Only people you invite can view it.

Disabled

Set disabled on an item, or on the RadioGroup to disable all of them.

Layout

Not available on small screens.

Choice cards

Put the item and its FieldContent inside the FieldLabel to make the whole card clickable.

Plan

Invalid

Wrap the group in a Field, set invalid on it, and explain the problem with a FieldError.

Shipping speed

Props

The tables leave out className, style and render. Parts built on Base UI take them as its styling and composition guides describe.

RadioGroup

RadioGroupItem