Radio Menu Item (Deprecated)

ui:radioMenuItem

​Deprecated as of API version 47.0. We recommend migrating to Lightning Web Components and using the lightning-menu-item component.

For Use In

Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out (Beta), Standalone Lightning App

Deprecation Guidelines 

We recommend using Lightning Web Components whenever possible. When migrating to Lightning Web Components, use lightning-menu-item with lightning-button-menu.

For more information, see Aura Components in the ui Namespace Are Deprecated.

Usage Overview (Deprecated) 

A ui:radioMenuItem component represents a menu list item for single selection. Use aura:iteration to iterate over a list of values and display the menu items. A ui:menuTriggerLink component displays and hides your menu items.

1<aura:attribute name="status" type="String[]" default="Open, Closed, Closed Won, Any" />
2<ui:menu>
3  <ui:menuTriggerLink class="radioMenuLabel" aura:id="radioMenuLabel" label="Select a status" />
4  <ui:menuList class="radioMenu" aura:id="radioMenu">
5    <aura:iteration items="{!v.status}" var="s">
6      <ui:radioMenuItem label="{!s}" />
7    </aura:iteration>
8  </ui:menuList>
9</ui:menu>

Attributes 

NameDescriptionTypeDefaultRequired
bodyThe body of the component. In markup, this is everything in the body of the tag.Aura.Component[]
classA CSS style to be attached to the component. This style is added in addition to base styles output by the component.String
disabledSpecifies whether the component should be displayed in a disabled state. Default value is "false".Booleanfalse
hideMenuAfterSelectedSet to true to hide menu after the menu item is selected.Booleantrue
labelThe text displayed on the component.String
selectedThe status of the menu item. True means this menu item is selected; False is not selected.Booleanfalse
typeThe concrete type of the menu item. Accepted values are 'action', 'checkbox', 'radio', 'separator' or any namespaced component descriptor, e.g. ns:xxxxmenuItem.String