React Native · APIs and utilities
Overlay placement
Position of a floating element (Menu, Popover, Tooltip…) relative to its trigger: the side and the alignment on that side.
4 exports
Placement
typePosition of a floating element (Menu, Popover, Tooltip…) relative to its trigger: the side and the alignment on that side. The same as Placement on web.
"auto": The best position is chosen; if it does not fit the screen it moves elsewhere. Menu/Popover start below with left edges aligned; Tooltip above and centered."top","bottom","left","right": Centered on that side."bottom-left": Below; left edges aligned, opening to the right."bottom-right"aligns the right edges."top-left","top-right"the same above."right-top": On the right; top edges aligned."left-bottom"on the left, bottom edges aligned.
If the chosen position does not fit the screen it flips to the opposite side and/or the opposite alignment.
Side
typeThe side the floating element is placed on relative to its anchor.
FixedPlacement
typePositions other than "auto".
Insets
interfaceUnusable insets at the screen edges (notch, status bar…).
| Name | Type | Description |
|---|---|---|
top | number | Top. |
right | number | Right. |
bottom | number | Bottom. |
left | number | Left. |