RadioGroup
A container for a set of related Radio buttons, allowing the user to select exactly one option from the group. Provide the choices via the convenient options shorthand or as individual Radio child items. The group's value reflects the selected radio button's value and can be read from a parent container's values. Set clearable to allow unchecking the current selection.
new RadioGroup({
title : 'Resolve Conflict',
name : 'resolution',
value : 'A',
options : {
A : 'Keep the original version',
B : 'Use the new version',
C : 'Reconcile individual conflicts'
}
});
Nested Items
Radio buttons can also have a container of additional items. These items can be displayed immediately following the field's label (which is the default when there is only one item) or below the radio button. This can be controlled using the inline config.
In the demo below notice how additional fields are displayed for the checked radio button:
Useful configs and properties
| Config / Property | Description |
|---|---|
| options | Object mapping values to display labels |
| name | Name used when reading/writing container values |
| clearable | Allow unchecking the currently selected radio button |
| value | The value of the currently checked radio button |
See also
- Radio - Individual radio button widget
- CheckboxGroup - Similar group widget for multiple-selection checkboxes
- FieldSet - Base fieldset container
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Set this to
trueso that clicking the currently checked radio button will clear the check from all radio buttons in the group. -
This property corresponds to the checkedValue of the currently checked radio button.
Has a corresponding runtime value property.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of RadioGroup class, or subclass thereof.
-
This property corresponds to the checkedValue of the currently checked radio button.
Has a corresponding value config.
-
Identifies an object as an instance of RadioGroup class, or subclass thereof.
CSS variables
CSS variables that can be set to adjust appearance| Name | Description |
|---|---|
| --b-radio-group-gap | The gap between radio buttons in a group |