diff --git a/packages/main/src/Menu.ts b/packages/main/src/Menu.ts index ef01695a042b..372a90d704ea 100644 --- a/packages/main/src/Menu.ts +++ b/packages/main/src/Menu.ts @@ -40,6 +40,7 @@ import { // Styles import menuCss from "./generated/themes/Menu.css.js"; +import type PopoverVerticalAlign from "./types/PopoverVerticalAlign.js"; const MENU_OPEN_DELAY = 300; @@ -208,6 +209,14 @@ class Menu extends UI5Element { @property() horizontalAlign: `${PopoverHorizontalAlign}` = "Start"; + /** + * Determines the vertical alignment of the menu relative to its opener control. + * @default "Start" + * @public + */ + @property() + verticalAlign: `${PopoverVerticalAlign}` = "Bottom"; + /** * Defines if a loading indicator would be displayed inside the corresponding ui5-menu popover. * @default false diff --git a/packages/main/src/MenuTemplate.tsx b/packages/main/src/MenuTemplate.tsx index aa0bcaed0185..67739994be96 100644 --- a/packages/main/src/MenuTemplate.tsx +++ b/packages/main/src/MenuTemplate.tsx @@ -11,7 +11,7 @@ export default function MenuTemplate(this: Menu) { id={`${this._id}-menu-rp`} class="ui5-menu-rp" placement="Bottom" - verticalAlign="Bottom" + verticalAlign={this.verticalAlign} horizontalAlign={this.horizontalAlign} opener={this.opener} open={this.open}