Newer Version Available
Menus
A menu is a dropdown list with a trigger that controls the visibility of the list items. To create an accessible menu, use lightning:buttonMenu. Provide a text label or assistive text, and specify a list of menu items using lightning:menuItem. The dropdown menu items are hidden by default.
This example creates a menu with several items:
1<lightning:buttonMenu iconName="utility:settings"
2 alternativeText="Settings"
3 onselect="{! c.handleMenuSelect }">
4 <lightning:menuItem label="Font" value="font" />
5 <lightning:menuItem label="Size" value="size"/>
6 <lightning:menuItem label="Format" value="format" />
7</lightning:buttonMenu>The alternativeText attribute provides a text label that’s hidden from view and available to assistive technology.
lightning:buttonMenu implements the menu blueprint in the Salesforce Lightning Design System and follows its accessibility guidelines.