ArrowPositioner

Primitive #31

🔍 Problem it solves

Tooltips and popovers often have a small arrow pointing to the trigger element. The arrow needs to move based on the overlay's side (top/bottom/left/right) and alignment (start/center/end).

✅ Solution

calculateArrowPosition(side, alignment, overlayWidth, overlayHeight, arrowSize) returns top/left coordinates and a transform (rotation) for the arrow element, relative to the overlay. This demo integrates it with a live tooltip.

🧩 Used by components

Tooltip, Popover, Dropdown, Select, Menu, ContextMenu

🎮 Interactive demo