ion-radio
Radios should be used inside of a radio group. Pressing a radio will check it and uncheck the previously selected radio, if there is one. They can also be checked programmatically by setting the value property of the parent radio group to the value of the radio.
When radios are inside of a radio group, only one radio will be checked at any time. If more than one item should be selected, checkboxes should be used instead. Radios can be disabled within a group to prevent interaction with them.
Basic Usage
Deselecting Radios
By default, once a radio is selected it cannot be deselected; pressing it again will keep it selected. This behavior can be modified by using the allowEmptySelection property on the parent radio group, which enables the radios to be deselected.
Theming
Colors
CSS Custom Properties
CSS Shadow Parts
Properties
color
"primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.color"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefinedundefineddisabled
true, the user cannot interact with the radio.disabledbooleanfalsemode
mode"ios" | "md"undefinedname
namestringthis.inputIdvalue
valueanyundefinedEvents
| Name | Description | Bubbles |
|---|---|---|
ionBlur | Emitted when the radio button loses focus. | true |
ionFocus | Emitted when the radio button has focus. | true |
Methods
No public methods available for this component.
CSS Shadow Parts
| Name | Description |
|---|---|
container | The container for the radio mark. |
mark | The checkmark or dot used to indicate the checked state. |
CSS Custom Properties
| Name | Description |
|---|---|
--border-radius | Border radius of the radio |
--color | Color of the radio |
--color-checked | Color of the checked radio |
--inner-border-radius | Border radius of the inner checked radio |
Slots
No slots available for this component.