1

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>

1 Answer 1

3

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.

1
  • ohh thanks. I did not read the docs properly.
    – m_konyk
    Commented Mar 29, 2019 at 8:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .