androidx.compose.material3
MenuAnchorPositionSince 1.12
Class
No hand-written docs yet.
Class that determines the position of a menu relative to its anchor.
class MenuAnchorPosition
Used by
Parameters that take a MenuAnchorPosition.
MenuDefaults.rememberDropdownMenuPopupPositionProvider(dropdownMenuAnchorPosition)
Properties
Above
val Above: MenuAnchorPosition
Position the menu above its anchor.
Below
val Below: MenuAnchorPosition
Position the menu below its anchor.
Left
val Left: MenuAnchorPosition
Position the menu to the left of its anchor.
Right
val Right: MenuAnchorPosition
Position the menu to the right of its anchor.
Start
val Start: MenuAnchorPosition
Position the menu to the start of its anchor.
End
val End: MenuAnchorPosition
Position the menu to the end of its anchor.
Functions
Custom
fun Custom(
xCandidates: MenuPositionScope.() -> IntList,
yCandidates: MenuPositionScope.() -> IntList,
): MenuAnchorPosition
Create a custom positioning strategy by providing lambda functions for calculating candidate positions for the x and y axes. Note that candidate positioning coordinates are calculated relative to the window bounds.
Library docs
Class that determines the position of a menu relative to its anchor.
This allows selecting between standard positioning strategies (such as Above, Below, Start,
End, Left, Right) or providing a Custom implementation for complex positioning logic.