Skip to main content
Version: v5

ion-radio

Radios should be used inside of an ion-radio-group. Pressing on a radio will check it. They can also be checked programmatically by setting the value property of the parent ion-radio-group to the value of the radio.

When radios are inside of a radio group, only one radio in the group will be checked at any time. Pressing a radio will check it and uncheck the previously selected radio, if there is one. If a radio is not in a group with another radio, then both radios will have the ability to be checked at the same time.

Usage

<ion-list>
<ion-radio-group value="biff">
<ion-list-header>
<ion-label>Name</ion-label>
</ion-list-header>

<ion-item>
<ion-label>Biff</ion-label>
<ion-radio slot="start" value="biff"></ion-radio>
</ion-item>

<ion-item>
<ion-label>Griff</ion-label>
<ion-radio slot="start" value="griff"></ion-radio>
</ion-item>

<ion-item>
<ion-label>Buford</ion-label>
<ion-radio slot="start" value="buford"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>

Properties

color

DescriptionThe color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.
Attributecolor
Typestring | undefined
Defaultundefined

disabled

DescriptionIf true, the user cannot interact with the radio.
Attributedisabled
Typeboolean
Defaultfalse

mode

DescriptionThe mode determines which platform styles to use.
Attributemode
Type"ios" | "md"
Defaultundefined

name

DescriptionThe name of the control, which is submitted with the form data.
Attributename
Typestring
Defaultthis.inputId

value

Descriptionthe value of the radio.
Attributevalue
Typeany
Defaultundefined

Events

NameDescription
ionBlurEmitted when the radio button loses focus.
ionFocusEmitted when the radio button has focus.

Methods

No public methods available for this component.

CSS Shadow Parts

NameDescription
containerThe container for the radio mark.
markThe checkmark or dot used to indicate the checked state.

CSS Custom Properties

NameDescription
--border-radiusBorder radius of the radio
--colorColor of the radio
--color-checkedColor of the checked radio
--inner-border-radiusBorder radius of the inner checked radio

Slots

No slots available for this component.

View Source