RadioButtonGroup properties
Summary
Props table
Parameter |
Type |
Default |
|---|---|---|
number |
/ |
|
{ component: JSX.Element, text: string, textPosition: top | bottom | left | right }[] |
/ |
|
string |
/ |
|
RadioButtonProps |
/ |
|
top | bottom | left | right |
left |
|
boolean |
false |
|
(newValue: number) => void |
() => {} |
Props list
value
Type |
Default |
|---|---|
number |
/ |
Selected RadioButton (as index)
buttons
Type |
Default |
|---|---|
{ component: JSX.Element, text: string, textPosition: top | bottom | left | right }[] |
/ |
Radio elements array. Every element UI can be driven with attributes. A radio element can contain 3 fields:
- -
component: custom component rendered before radio button - -
text: custom radio text showed near the radio button - -
textPosition: custom text position
elementClassName
Type |
Default |
|---|---|
string |
/ |
Classname applied on every radio element
radioProps
Type |
Default |
|---|---|
RadioButtonProps |
/ |
RadioButton props applied on every RadioButton element
defaultPosition
Type |
Default |
|---|---|
top | bottom | left | right |
left |
Default text position for RadioButton elements (when textPosition is not provided)
horizontal
Type |
Default |
|---|---|
boolean |
false |
If true, the RadioButton elements are displayed horizontally
onChange
Type |
Default |
|---|---|
(newValue: number) => void |
() => {} |
Callback triggered when a RadioButton is clicked by the user, giving its index as parameter