Menu Divider

lightning:menuDivider

Creates a divider in the list of items for lightning:buttonMenu.

For Aura components only. For LWC development, use lightning-menu-divider.

For Use In

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

The lightning:menuDivider component creates a dividing line after a menu item in a lightning:buttonMenu component. Use a menu divider to introduce a break between item categories or separate items into groups, for example.

To draw a line after a menu item, nest the component inside lightning:buttonMenu after the lightning:menuItem where you want the line. Use lightning:menuDivider as a sibling of lightning:menuItem, not as a child component.

This example shows a dropdown menu with two dividers.

By default, space is added above and below the divider. Use variant="compact" with lightning:menuDivider to reduce the space.

For further customization of button menus, use lightning:menuSubheader to create subheaders in the list of items. You can place dividers under subheaders or menu items.