Menu List (Deprecated)

ui:menuList

Deprecated as of API version 47.0. We recommend migrating to Lightning Web Components and using the lightning-button-menu 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-button-menu.

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

Usage Overview (Deprecated) 

This component is nested in a ui:menu component and can be used together with a ui:menuTriggerLink component. Clicking the menu trigger displays the container with menu items.

1<ui:menu>
2
3  <ui:menuTriggerLink aura:id="trigger" label="Click me to display menu items" />
4
5  <ui:menuList class="actionMenu" aura:id="actionMenu">
6
7    <ui:actionMenuItem aura:id="item1" label="Item 1" click="{!c.doSomething}" />
8
9    <ui:actionMenuItem aura:id="item2" label="Item 2" click="{!c.doSomething}" />
10
11    <ui:actionMenuItem aura:id="item3" label="Item 3" click="{!c.doSomething}" />
12
13    <ui:actionMenuItem aura:id="item4" label="Item 4" click="{!c.doSomething}" />
14
15  </ui:menuList>
16
17</ui:menu>

ui:menuList can contain these components, which runs a client-side controller when clicked:

  • ui:actionMenuItem
  • ui:checkboxMenuItem
  • ui:radioMenuItem
  • ui:menuItemSeparator

See ui:menu for more information.

Attributes 

NameDescriptionTypeDefaultRequired
autoPositionMove the popup target up when there is not enough space at the bottom to display. Note: even if autoPosition is set to false, popup will still position the menu relative to the trigger. To override default positioning, use manualPosition attribute.Booleantrue
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
classA CSS style to be attached to the component. This style is added in addition to base styles output by the component.String
closeOnClickOutsideClose target when user clicks or taps outside of the targetBooleantrue
closeOnTabKeyIndicates whether to close the target list on tab key or not.Booleantrue
curtainWhether or not to apply an overlay under the target.Booleanfalse
menuItemsA list of menu items set explicitly using instances of the Java class: aura.​components.​ui.MenuItem.List
visibleControls the visibility of the menu. The default is false, which hides the menu.Booleanfalse