ion-radio-group
A radio group is a container for a group of radios. It allows a user to select at most one radio button from a set. Checking one radio button that belongs to a radio group unchecks any previous checked radio button within the same group. For example usage of the radio group, see the radio documentation.
Interfacesâ
RadioGroupChangeEventDetailâ
interface RadioGroupChangeEventDetail<T = any> {
value: T;
}
RadioGroupCustomEventâ
While not required, this interface can be used in place of the CustomEvent
interface for stronger typing with Ionic events emitted from this component.
interface RadioGroupCustomEvent<T = any> extends CustomEvent {
detail: RadioGroupChangeEventDetail<T>;
target: HTMLIonRadioGroupElement;
}
Propertiesâ
allowEmptySelectionâ
Description | If true , the radios can be deselected. |
Attribute | allow-empty-selection |
Type | boolean |
Default | false |
compareWithâ
Description | This property allows developers to specify a custom function or property name for comparing objects when determining the selected option in the ion-radio-group. When not specified, the default behavior will use strict equality (===) for comparison. |
Attribute | compare-with |
Type | ((currentValue: any, compareValue: any) => boolean) īŊ null īŊ string īŊ undefined |
Default | undefined |
errorTextâ
Description | The error text to display at the top of the radio group. |
Attribute | error-text |
Type | string īŊ undefined |
Default | undefined |
helperTextâ
Description | The helper text to display at the top of the radio group. |
Attribute | helper-text |
Type | string īŊ undefined |
Default | undefined |
nameâ
Description | The name of the control, which is submitted with the form data. |
Attribute | name |
Type | string |
Default | this.inputId |
valueâ
Description | the value of the radio group. |
Attribute | value |
Type | any |
Default | undefined |
Eventsâ
Name | Description | Bubbles |
---|---|---|
ionChange | Emitted when the value has changed. This event will not emit when programmatically setting the value property. | true |
Methodsâ
No public methods available for this component.
CSS Shadow Partsâ
No CSS shadow parts available for this component.
CSS Custom Propertiesâ
No CSS custom properties available for this component.
Slotsâ
No slots available for this component.