Radio Buttons

Radios allow the user to select one item at a time from a set. Radios can be used to turn an option on or off.

Properties

Radio buttons are offered with the following property variables:

PropTypeDefaultNotes
size
string
small
Can be small or large
name
string
N/A
Required prop
value
string
N/A
Required prop (array of strings for RadioGroup)
index
number
N/A
Required for keyboard accessibility
onChange
function
N/A
Change handler (required when used with RadioGroup)
isActive
boolean
true
Defines if button is enabled or disabled

24px - Height

Default
Disabled
Code
<div>
  <RadioGroup>
    <RadioButton
      checked
      index={0}
      name='OptionLargeEnabled'
      size='large'
      value='1'
    >
      Selection Value
    </RadioButton>
  </RadioGroup>
  <RadioGroup>
    <RadioButton
      checked
      index={0}
      isActive={false}
      name='OptionLargeDisabled'
      size='large'
      value='1'
    >
      Selection Value
    </RadioButton>
  </RadioGroup>
</div>

16px - Height

Default
Disabled
Code
<div>
  <RadioGroup>
    <RadioButton
      checked
      index={0}
      name='OptionSmallEnabled'
      value='1'
    >
      Selection Value
    </RadioButton>
  </RadioGroup>
  <RadioGroup>
    <RadioButton
      checked
      index={0}
      isActive={false}
      name='OptionSmallDisabled'
      value='1'
    >
      Selection Value
    </RadioButton>
  </RadioGroup>
</div>