Overlays need to know if they are near viewport edges to adjust position or content (e.g., truncate text, change direction).
Provides getDistanceToViewportEdges(element) returning distances to top/bottom/left/right edges, plus helpers
isNearTop(), isNearBottom(), isNearLeft(), isNearRight() with configurable threshold.
ContextMenu, Dropdown, Tooltip, Popover, DatePicker