Radio Group

A set of checkable buttons where only one option can be selected at a time.

Plan

Usage

Add the input class to your <input type="radio"> elements. Use a shared name attribute for mutually exclusive options, and wrap related options in a semantic <fieldset> or an element with role="radiogroup".

<input type="radio" name="plan" class="input">

Checked state

Use native HTML state. Add checked for the initially selected option, or read and update the element's checked property in JavaScript.

<input type="radio" name="plan" class="input" checked>

Invalid state

Set aria-invalid="true" on the invalid radio and, when using field, set data-invalid="true" on the field wrapper.

You must select an option to continue.

Examples

Basic

Description

Receive a notification for every new message.

Only notify me for direct messages and mentions.

Choice Card

Wrap a .field in a native <label> when the whole card should select the option.

Fieldset

Notify me about...

Disabled

Invalid

Plan

Select a plan to continue.

RTL

Radio group layout uses document direction and logical spacing. Set dir="rtl" on a parent to render right-to-left.