Chi Design System
v6.29.0v6.28.0v6.27.0v6.26.0v6.25.0v6.24.0v6.23.0v6.22.0v6.21.0v6.20.0v6.19.0v6.18.0v6.17.0v6.16.0v6.15.0v6.14.0v6.13.0v6.12.0v6.11.0v6.10.0v6.9.0v6.8.0v6.7.0v6.6.0v6.5.0v6.4.0v6.3.0v6.2.0v6.1.0v6.0.0v5.78.0v5.77.0v5.76.0v5.75.0v5.74.0v5.73.0v5.72.0v5.71.0v5.70.0v5.69.0v5.68.0v5.67.0v5.66.0v5.65.0v5.64.0v5.63.0v5.62.0v5.61.0v5.60.0v5.59.0v5.58.0v5.57.0v5.56.0v5.55.0v5.54.0v5.53.0v5.52.0v5.51.1v5.51.0v5.50.0v5.49.0v5.48.0v5.47.0v5.46.0v5.45.0v5.44.0v5.43.0v5.42.0v5.41.0v5.40.0v5.39.0v5.38.0v5.37.0v5.36.0v5.35.0v5.34.0v5.33.0v5.32.0v5.31.0v5.30.0v5.29.0v5.28.0v5.27.0v5.26.0v5.25.0v5.24.0v5.23.0v5.22.0v5.21.0v5.20.1v5.20.0v5.19.0v5.18.0v5.17.0v5.16.0v5.15.0v5.14.1v5.14.0v5.13.1v5.13.0v5.12.0v5.11.0v5.9.1v5.9.0v5.8.0v5.7.0v5.6.0v5.5.0v5.4.0v5.3.1v5.3.0v5.2.0v5.1.0v5.0.0v4.4.0v4.3.0v4.2.0v4.1.2v4.1.1v4.1.0v4.0.0v3.17.0v3.16.0v3.15.0v3.14.0v3.13.0v3.12.0v3.11.0v3.10.0v3.9.0v3.8.0v3.7.0v3.6.0v3.5.0v3.4.0v3.3.0v3.2.0v3.1.1v3.1.0v3.0.0v2.6.0v2.5.1v2.5.0v2.4.1v2.4.0v2.3.0v2.2.0v2.1.0v2.0.0Email SupportTalk #Chi on Microsoft Teams
CenturyLink
Lumen
Lumen Enterprise Portal
  • Getting Started
    • Introduction
    • Installation
    • Development workflow
    • Browser support
    • What's new
  • Foundations
      • Overview
      • Using the keyboard
      • Page structure
      • Color and sensory
      • Images
      • Text
      • Links and forms
      • Tables
      • Other
      • Color
      • Design tokens
      • Grid
  • Components
    • Accordion
    • Activity
    • Alert
    • Avatar
    • Badge
    • Brand
    • Breadcrumb
    • Button
    • Button group
    • Cache Loader
    • Card
    • Carousel
    • Checkbox
    • Copy text
    • Data table
    • Date picker
    • Divider
    • Drawer
    • Dropdown
    • Expansion panel
    • File input
    • Flag icon
    • Footer
    • Header
    • Icon
    • Label
    • Link
    • Marketing icon
    • Mobile navigation
    • Modal
    • Number input
    • Pagination
    • Phone Input
    • Picker
    • Picker group
    • Popover
    • Price
    • Progress
    • Radio button
    • Range slider
    • Search input
    • Select
    • Sidenav
    • Skeleton
    • Spinner
    • Stat
    • Steps
    • Table
    • Tabs
    • Tags
    • Text input
    • Textarea
    • Time picker
    • Toggle switch
    • Toolbar
    • Tooltip
    • Transfer list
  • Utilities
    • Border
    • Color
    • Display
    • Flex
    • Image
    • Opacity
    • Overflow
    • Position
    • Shadow
    • Sizing
    • Spacing
    • Text
    • Vertical-align
    • Z-index
  • Templates
    • App Layout
    • Card
    • Error 404
    • Error 500
    • State
CenturyLink
Lumen
Lumen Enterprise Portal
  • Getting Started
    • Introduction
    • Installation
    • Development workflow
    • Browser support
    • What's new
  • Foundations
      • Overview
      • Using the keyboard
      • Page structure
      • Color and sensory
      • Images
      • Text
      • Links and forms
      • Tables
      • Other
      • Color
      • Design tokens
      • Grid
  • Components
    • Accordion
    • Activity
    • Alert
    • Avatar
    • Badge
    • Brand
    • Breadcrumb
    • Button
    • Button group
    • Cache Loader
    • Card
    • Carousel
    • Checkbox
    • Copy text
    • Data table
    • Date picker
    • Divider
    • Drawer
    • Dropdown
    • Expansion panel
    • File input
    • Flag icon
    • Footer
    • Header
    • Icon
    • Label
    • Link
    • Marketing icon
    • Mobile navigation
    • Modal
    • Number input
    • Pagination
    • Phone Input
    • Picker
    • Picker group
    • Popover
    • Price
    • Progress
    • Radio button
    • Range slider
    • Search input
    • Select
    • Sidenav
    • Skeleton
    • Spinner
    • Stat
    • Steps
    • Table
    • Tabs
    • Tags
    • Text input
    • Textarea
    • Time picker
    • Toggle switch
    • Toolbar
    • Tooltip
    • Transfer list
  • Utilities
    • Border
    • Color
    • Display
    • Flex
    • Image
    • Opacity
    • Overflow
    • Position
    • Shadow
    • Sizing
    • Spacing
    • Text
    • Vertical-align
    • Z-index
  • Templates
    • App Layout
    • Card
    • Error 404
    • Error 500
    • State

Radio button

Radio buttons are used to select a single item in a list of options.
  • Examples
  • Properties
  • Accessibility

Examples

Base#

<chi-form-wrapper
  type="radio"
  label="Select an option"
  id="form-wrapper-radio-base"
></chi-form-wrapper>

<script>
document.getElementById("form-wrapper-radio-base").options = [
  { label: "Option 1", name: "radios" },
  { label: "Option 2", name: "radios" },
];
</script>
<fieldset>
  <legend class="chi-label">Select an option</legend>
  <div class="chi-form__item -mb--1">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__base_opt_1">
      <label class="chi-radio__label" for="example__base_opt_1">Option 1</label>
    </div>
  </div>
  <div class="chi-form__item">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__base_opt_2">
      <label class="chi-radio__label" for="example__base_opt_2">Option 2</label>
    </div>
  </div>
</fieldset>

Checked#

Use the checked boolean attribute to set the value of a radio button input to true.

<chi-form-wrapper
  type="radio"
  label="Select an option"
  id="form-wrapper-radio-checked"
></chi-form-wrapper>

<script>
document.getElementById("form-wrapper-radio-checked").options = [
  { label: "Option 1", name: "radios", checked: true },
  { label: "Option 2", name: "radios" },
];
</script>
<fieldset>
  <legend class="chi-label">Select an option</legend>
  <div class="chi-form__item -mb--1">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__checked_opt_1" checked>
      <label class="chi-radio__label" for="example__checked_opt_1">Option 1</label>
    </div>
  </div>
  <div class="chi-form__item">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__checked_opt_2">
      <label class="chi-radio__label" for="example__checked_opt_2">Option 2</label>
    </div>
  </div>
</fieldset>

Disabled#

Use the disabled boolean attribute to prevent users from interacting with an input. Disabled inputs are not submitted with the form and can not receive any browsing events such as mouse clicks or focus.

<chi-form-wrapper
  type="radio"
  label="Select an option"
  id="form-wrapper-radio-disabled"
></chi-form-wrapper>

<script>
document.getElementById("form-wrapper-radio-disabled").options = [
  { label: "Option 1", name: "radios", disabled: true },
  { label: "Option 2", name: "radios" },
  { label: "Option 3", name: "radios" },
];
</script>
<fieldset>
  <legend class="chi-label">Select an option</legend>
  <div class="chi-form__item -mb--1">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__disabled_opt_1" disabled>
      <label class="chi-radio__label" for="example__disabled_opt_1">Option 1</label>
    </div>
  </div>
  <div class="chi-form__item -mb--1">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__disabled_opt_2">
      <label class="chi-radio__label" for="example__disabled_opt_2">Option 2</label>
    </div>
  </div>
  <div class="chi-form__item">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__disabled_opt_3">
      <label class="chi-radio__label" for="example__disabled_opt_3">Option 3</label>
    </div>
  </div>
</fieldset>

Required#

Use the required property to indicate which radio buttons must be completed before submitting a form.

Select an option*
<chi-form-wrapper
  type="radio"
  label="Select an option"
  required
  id="form-wrapper-radio-required"
></chi-form-wrapper>

<script>
document.getElementById("form-wrapper-radio-required").options = [
  { label: "Option 1", name: "radios" },
  { label: "Option 2", name: "radios" },
];
</script>
<fieldset>
  <legend class="chi-label">
    Select an option
    <abbr class="chi-label__required" aria-label="Required field">*</abbr>
  </legend>
  <div class="chi-form__item -mb--1">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__required_opt_1" required>
      <label class="chi-radio__label" for="example__required_opt_1">Option 1</label>
    </div>
  </div>
  <div class="chi-form__item">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__required_opt_2">
      <label class="chi-radio__label" for="example__required_opt_2">Option 2</label>
    </div>
  </div>
</fieldset>

Optional#

Use optional property to help emphasize a group of radio button options are not required and can be skipped.

Select an option(optional)
<chi-form-wrapper
  type="radio"
  label="Select an option"
  optional
  id="form-wrapper-radio-optional"
></chi-form-wrapper>

<script>
document.getElementById("form-wrapper-radio-optional").options = [
  { label: "Option 1", name: "radios" },
  { label: "Option 2", name: "radios" },
];
</script>
<fieldset>
  <legend class="chi-label">
    Select an option
    <abbr class="chi-label__optional" aria-label="Optional field">(optional)</abbr>
  </legend>
  <div class="chi-form__item -mb--1">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__optional_opt_1">
      <label class="chi-radio__label" for="example__optional_opt_1">Option 1</label>
    </div>
  </div>
  <div class="chi-form__item">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__optional_opt_2">
      <label class="chi-radio__label" for="example__optional_opt_2">Option 2</label>
    </div>
  </div>
</fieldset>

Help#

Use info-icon and info-icon-message to include a help icon that displays helpful information in a popover.

Select an option
Helpful information goes here
<chi-form-wrapper
  type="radio"
  label="Select an option"
  info-icon
  info-icon-message="Helpful information goes here"
  id="form-wrapper-radio-help"
></chi-form-wrapper>

<script>
document.getElementById("form-wrapper-radio-help").options = [
  { label: "Option 1", name: "radios" },
  { label: "Option 2", name: "radios" },
];
</script>
This HTML Blueprint requires JavaScript. You may use your own solution, or use Chi's vanilla JavaScript solution, Chi.js.
<fieldset>
  <div class="chi-label__wrapper">
    <legend class="chi-label">Select an option</legend>
    <div class="chi-label__help">
      <button class="chi-button -icon -xs -flat" id="example__help-button" aria-label="Help" data-target="#example___help-popover">
        <i class="chi-icon icon-circle-info-outline" aria-hidden="true"></i>
      </button>
      <section class="chi-popover chi-popover--top -animated" id="example___help-popover" aria-modal="true" role="dialog" aria-hidden="true" x-placement="top">
        <div class="chi-popover__content">
          <p class="chi-popover__text">Helpful information goes here.</p>
        </div>
      </section>
    </div>
  </div>
  <div class="chi-form__item -mb--1">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__help_opt_1">
      <label class="chi-radio__label" for="example__help_opt_1">Option 1</label>
    </div>
  </div>
  <div class="chi-form__item">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__help_opt_2">
      <label class="chi-radio__label" for="example__help_opt_2">Option 2</label>
    </div>
  </div>
</fieldset>

<script>chi.popover(document.getElementById('example__help-button'));</script>

Error#

Set danger value to state property and set the helper-message to provide feedback to users when a selection has not been made. Once a selection has been made, the properties must be removed. To meet accessibility requirements, danger inputs must include an error message explaining the failure and/or how to correct it.

<chi-form-wrapper
  type="radio"
  label="Select an option"
  state="danger"
  helper-message="Please select an option"
  id="form-wrapper-radio-error"
></chi-form-wrapper>

<script>
document.getElementById("form-wrapper-radio-error").options = [
  { label: "Option 1", name: "radios" },
  { label: "Option 2", name: "radios" },
];
</script>
<fieldset>
  <legend class="chi-label">
    Select an option
    <abbr class="chi-label__required" aria-label="Required field">*</abbr>
  </legend>
  <div class="chi-form__item -mb--1">
    <div class="chi-radio">
      <input class="chi-radio__input -danger" type="radio" name="radios" id="example__error_opt_1" required>
      <label class="chi-radio__label" for="example__error_opt_1">Option 1</label>
    </div>
  </div>
  <div class="chi-form__item">
    <div class="chi-radio">
      <input class="chi-radio__input -danger" type="radio" name="radios" id="example__error_opt_2">
      <label class="chi-radio__label" for="example__error_opt_2">Option 2</label>
    </div>
  </div>
  <div class="chi-label -status -danger">
    <i class="chi-icon icon-circle-warning" aria-hidden="true"></i>
    Please select an option
  </div>
</fieldset>

Layout Variations

Inline#

Display two or more radio buttons in one row, by setting the layout property to inline.

<chi-form-wrapper
  type="radio"
  label="Select an option"
  layout="inline"
  id="form-wrapper-radio-inline"
></chi-form-wrapper>

<script>
document.getElementById("form-wrapper-radio-inline").options = [
  { label: "Option 1", name: "radios" },
  { label: "Option 2", name: "radios" },
];
</script>
<fieldset>
  <legend class="chi-label">Select an option</legend>
  <div class="chi-form__item -inline">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__inline_opt_1">
      <label class="chi-radio__label" for="example__inline_opt_1">Option 1</label>
    </div>
  </div>
  <div class="chi-form__item -inline">
    <div class="chi-radio">
      <input class="chi-radio__input" type="radio" name="radios" id="example__inline_opt_2" disabled>
      <label class="chi-radio__label" for="example__inline_opt_2">Option 2</label>
    </div>
  </div>
</fieldset>

Radio Button List#

Radio button lists are used to wrap a series of radio buttons in a list. To render a series of radio buttons in a list, apply the class -list to chi-form__item.

Select an option
<fieldset>
  <legend class="chi-label">Select an option</legend>
  <ul class="chi-form__item -list">
    <li class="chi-form__item">
      <chi-radio-button id="example__list_opt_1" label="Option 1" name="radio-button-list"></chi-radio-button>
    </li>
    <li class="chi-form__item">
      <chi-radio-button id="example__list_opt_2" label="Option 2" name="radio-button-list"></chi-radio-button>
    </li>
    <li class="chi-form__item">
      <chi-radio-button id="example__list_opt_3" label="Option 3" name="radio-button-list"></chi-radio-button>
    </li>
    <li class="chi-form__item">
      <chi-radio-button id="example__list_opt_4" label="Option 4" name="radio-button-list"></chi-radio-button>
    </li>
    <li class="chi-form__item">
      <chi-radio-button id="example__list_opt_5" label="Option 5" name="radio-button-list"></chi-radio-button>
    </li>
  </ul>
</fieldset>
<fieldset>
  <legend class="chi-label">Select an option</legend>
  <ul class="chi-form__item -list">
    <li class="chi-form__item">
      <div class="chi-radio">
        <input type="radio" class="chi-radio__input" name="radio-button-list" id="example__list_opt_1">
        <label class="chi-radio__label" for="example__list_opt_1">Option 1</label>
      </div>
    </li>
    <li class="chi-form__item">
      <div class="chi-radio">
        <input type="radio" class="chi-radio__input" name="radio-button-list" id="example__list_opt_2">
        <label class="chi-radio__label" for="example__list_opt_2">Option 2</label>
      </div>
    </li>
    <li class="chi-form__item">
      <div class="chi-radio">
        <input type="radio" class="chi-radio__input" name="radio-button-list" id="example__list_opt_3">
        <label class="chi-radio__label" for="example__list_opt_3">Option 3</label>
      </div>
    </li>
    <li class="chi-form__item">
      <div class="chi-radio">
        <input type="radio" class="chi-radio__input" name="radio-button-list" id="example__list_opt_4">
        <label class="chi-radio__label" for="example__list_opt_4">Option 4</label>
      </div>
    </li>
    <li class="chi-form__item">
      <div class="chi-radio">
        <input type="radio" class="chi-radio__input" name="radio-button-list" id="example__list_opt_5">
        <label class="chi-radio__label" for="example__list_opt_5">Option 5</label>
      </div>
    </li>
  </ul>
</fieldset>

Web Component

Properties

PropertyAttributeDescriptionTypeDefault
checked
checked
To render the radiobutton in checked state
boolean
undefined
disabled
disabled
To disable the radiobutton
boolean
undefined
label
label
To provide radiobutton label as a string
string
undefined
name
name
To render the radiobutton input with a respective name attribute
string
undefined
state
state
To indicate the state
"danger" | "success" | "warning"
undefined

Events

EventDescriptionType
chiBlur
Triggered when the radio-button has lost the focus
CustomEvent<boolean | string>
chiChange
Triggered when the user selects or deselects the radio-button
CustomEvent<boolean | string>
chiFocus
Triggered when the radio-button has the focus
CustomEvent<boolean | string>

Accessibility

Keyboard Navigation

KeyFunction
TabMoves focus to the next focusable element
Shift + TabMoves focus to the previous focusable element
SpaceToggles the selection state of the radio button between checked and unchecked

For comprehensive details on keyboard support for input fields, refer to our Keyboard Control Guide.

Visit WebAIM for keyboard techniques.

Guidance for developers
  • Use clear and descriptive labels for radio buttons to help users understand their purpose.
  • Ensure each radio button has an associated label element using the for attribute to match the id attribute of the radio button.
  • Assign unique id attributes to each radio button to maintain accessibility and prevent conflicts.
  • The fieldset surrounds the entire grouping of radio buttons. The legend provides a description for the grouping.
  • Use the aria-describedby attribute to associate error messages with radio buttons for accessibility.
  • Ensure that error messages are tagged with unique id attributes and referenced correctly with aria-describedby on corresponding radio buttons.
Guidance for designers
  • Ensure focus indicators are clearly visible to aid navigation for keyboard users.
  • Keep input labels visible, even when fields are focused.
  • Use contrasting colors for text and backgrounds to enhance readability.
  • Design clear error states and feedback for accessibility.
  • Use spacing, typography, and visual cues effectively.
  • Maintain consistency in the design of radio buttons to provide a cohesive user experience.

Find live examples in the A11y style guide.

Roles and attributes

WAI-ARIA provides a grouping role that functions similarly to fieldset and legend.

RoleElementUsage
groupdivIdentifies the div element as a group container for the radio buttons.

Resources

  • W3 Radio Button Group Example: Information about the radio button accessible behavior.
  • A11y Style Guide: Gives core recommendations for the accessible radio buttons.
  • W3C Forms Tutorial: Provides guidance on creating accessible forms.

Other recommendations

Explore additional accessibility tips in the general Accessibility Guide.

WCAG 2.2 Guidelines

  • Non-text Content: All non-text content that is presented to the user has a text alternative that serves the equivalent purpose. (Level A)
  • Info and Relationships: Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text. (Level A)
  • Headings and Labels: Headings and labels describe topic or purpose. (Level AA)
  • Labels or Instructions: Labels or instructions are provided when content requires user input. (Level A)
  • Name, Role, Value: For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies. (Level A)