Enums: Dropdown
Place dropdown menus precisely with direction and positioning enums.
Dropdown enums help you control where menus open and how they stay anchored during scrolling or layout changes.
How it works
Use Direction to choose the menu opening direction, and DropdownPositionStrategy to control how the floating element is positioned.
Examples
Direction.Downfor default dropdown behavior.Direction.Endfor right-aligned menus in LTR layouts.DropdownPositionStrategy.Fixedto reduce jumpiness while scrolling.
Reference
Direction
Direction of a dropdown menu.
Direction.DefaultUses the default direction, usually the same asDown.Direction.DownTrigger dropdown menus below an element (default behavior).Direction.UpTrigger dropdown menus above an element.Direction.EndTrigger dropdown menus to the end of an element.Direction.StartTrigger dropdown menus to the start of an element.
DropdownPositionStrategy
Defines the position strategy for the floating component.
DropdownPositionStrategy.AbsoluteThe floating element is positioned relative to its nearest positioned ancestor. With most layouts, this usually requires the browser to do the least work when updating the position.DropdownPositionStrategy.FixedThe floating element is positioned relative to its nearest containing block (usually the viewport). This is useful when the reference element is also fixed to reduce jumpiness with positioning while scrolling.