Menu Item (Deprecated)

ui:menuItem

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

For Use In

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

The ui:menuItem component is used in ui:menu.

Deprecation Guidelines 

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

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

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