I use lightning-button-menu
component and would like to align the menu top.
I found that it can be aligned left or right, but it there a possibility to align top?
<lightning-button-menu alternative-text="Export options"
variant="bare"
icon-name="utility:threedots_vertical"
menu-alignment="right">
<lightning-menu-item value="pfd"
label="Export to PDF">
</lightning-menu-item>
<lightning-menu-item value="xls"
label="Export to Excel">
</lightning-menu-item>
</lightning-button-menu>
Best Answer
Sure you can do it. The Lightning Design System specified this functionality: https://www.lightningdesignsystem.com/components/menus/#Positioned-Bottom
and also the mentioned LWC component implemented it too: https://developer.salesforce.com/docs/component-library/bundle/lightning:buttonMenu/specification
You need to use either bottom-left, bottom-center or bottom-right values in the menu-alignment argument.