Skip to main content

RadioGroup

Wrap a group of Radio Buttons to automatically control their selection
(code example)

Usage#

<RadioGroup initialValue={currentValue} onValueChange={onValueChange}>  <RadioButton value={'yes'} label={'Yes'}/>  <RadioButton value={'no'} label={'No'}/></RadioGroup>

API#

initialValue#

The initial value of the selected radio button
string | number | boolean

onValueChange#

Invoked once when value changes, by selecting one of the radio buttons in the group
((value?: string) => void) | ((value?: number) => void) | ((value?: boolean) => void) | ((value?: any) => void)