Directional Menu
Submenus stay open while your cursor moves toward them — no accidental closures mid-diagonal.
How it works
Naive dropdown menus close the submenu the moment your cursor leaves the parent item. Since the submenu is offset to the right, any diagonal movement briefly exits the parent — causing a frustrating flicker.
The fix: when your cursor leaves a parent item with an open submenu, we snapshot its position and project a triangle from that point to the top-left and bottom-left corners of the submenu. While the cursor stays inside this triangle, the submenu is kept alive. Enable Show safety area above to see it in real time.
Amazon's mega-nav has used this pattern for years. Ben Kamens wrote the canonical post about it.