RadioButtonGroup
unselected minimal usage
Any Paragon component or export may be added to the code example.
<RadioButtonGroupname="rbg"label="Radio Button Group"onBlur={() => console.log('blurred')}onChange={() => console.log('onChange')}onClick={() => console.log('onClick')}onFocus={() => console.log('onFocus')}onKeyDown={() => console.log('onKeyDown')}><RadioButton value="jaebaebae">First Value</RadioButton><RadioButton value="value2">Second Value</RadioButton><RadioButton value="value3">Third Value</RadioButton></RadioButtonGroup>
selected minimal usage
Any Paragon component or export may be added to the code example.
<RadioButtonGroupname="rbg-2"label="Radio Button Group"onBlur={() => console.log('blurred')}onChange={() => console.log('onChange')}onClick={() => console.log('onClick')}onFocus={() => console.log('onFocus')}onKeyDown={() => console.log('onKeyDown')}selectedIndex={1}><RadioButton value="jaebaebae">First Value</RadioButton><RadioButton value="value2">Second Value</RadioButton><RadioButton value="value3">Third Value</RadioButton></RadioButtonGroup>
Props API#
- children
element
[]
Required - label
string
Requiredspecifies the
aria-label
value for theRadioButtonGroup
- name
string
Requiredspecifies the
name
value for theRadioButtonGroup
so that no more than oneRadioButton
can be selected at any given time - onBlur
func
Default() => {}specifies the callback for the
onBlur
event for eachRadioButton
within the group. The default value is a no-op function. - onChange
func
Default() => {}specifies the callback for the onChange event for each RadioButton within the group. The default value is a no-op function.
- onClick
func
Default() => {}specifies the callback for the
onClick
event for eachRadioButton
within the group. The default value is a no-op function. - onFocus
func
Default() => {}specifies the callback for the
onFocus
event for eachRadioButton
within the group. The default value is a no-op function. - onKeyDown
func
Default() => {}specifies the callback for the
onKeyDown
event for eachRadioButton
within the group. The default value is a no-op function. - selectedIndex
number
specifies which
RadioButton
is initially selected. The default value isundefined
which signifies that noRadioButton
is initially selected.