Input Radio (Deprecated)
ui:inputRadio
Deprecated as of API version 47.0. We recommend migrating to Lightning Web Components and using the lightning-input component. For radio groups, use lightning-radio-group.
For Use In
Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out (Beta), Standalone Lightning App
We recommend using Lightning Web Components whenever possible. When migrating to Lightning Web Components, use lightning-input with radio type. For radio groups, use lightning-radio-group.
For more information, see Aura Components in the ui Namespace Are Deprecated.
A ui:inputRadio component represents a radio button whose state is controlled by the value and disabled attributes. It's rendered as an HTML input tag of type radio. To apply Lightning Design System styling, we recommend that you use lightning:radioGroup instead of ui:inputRadio.
To group your radio buttons together, specify the name attribute with a unique name.
This is a basic set up of a radio button.
This example results in the following HTML.
To create forms for Salesforce objects without using Apex controllers, use lightning:inputField with lightning:recordEditForm, or use lightning:recordForm. To create an input field for different data types, use lightning:input.