Radio buttons are offered with the following property variables:
Prop | Type | Default | Notes |
---|---|---|---|
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 |
<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>
<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>