Radio

Radio inputs allow users to select exactly one option from a number of choices. Radio inputs are generally displayed in a radio group.

    Usage

    <div class="c-radio">
      <input class="c-radio__input" type="radio" id="radio" name="radio" value="radio_3" />
      <label class="c-radio__label" for="radio">Default radio</label>
    </div>

    Implementation

    TypeClass
    Elements
    Wrapper.c-radio
    Inputinput.c-radio__input
    Labellabel.c-radio__labelOptional
    Description.c-radio__descriptionOptional
    Error message.c-radio__errorOptional
    ModifiersNone
    StatesNone
    Disableddisabled

    Elements

    With Description

    Use .c-radio__description to add an explanation to this specific radio input element.

    This is a description

    <div class="c-radio">
      <input class="c-radio__input" type="radio" id="radio_02" name="radio" value="radio_3" />
      <label class="c-radio__label" for="radio_02">Option</label>
      <p class="c-radio__description">This is a description</p>
    </div>

    With Error

    Use .c-radio__error to display error message that are specific to this radio input element, not the whole radio group.

    This is an error

    <div class="c-radio">
      <input class="c-radio__input" type="radio" id="radio_03" name="radio" value="radio_3" />
      <label class="c-radio__label" for="radio_03">Option</label>
      <p class="c-radio__error">This is an error</p>
    </div>

    States

    Disabled

    Add disabled to the input element if it's disabled.

    <div class="c-radio">
      <input class="c-radio__input" type="radio" id="radio" name="radio_04" value="radio_3" disabled />
      <label class="c-radio__label" for="radio_04">Disabled</label>
    </div>