Sébastien Rigaux

Context menus: guiding the cursor into submenus

View resource

sorenblank.com

Submenus become frustrating when a diagonal cursor movement makes them lose focus. This article compares ways to keep a menu open during that movement: a triangular safe area, a curved SVG path, or intent prediction based on cursor speed and position.

The key details are the interaction trade-offs: a safe area implemented as a DOM element can intercept clicks, while speed-based checks may close the menu for people who move the cursor slowly. The article also shows how React Aria accounts for tremors and for touch or pen input.

Five diagrams of cursor-safe paths: an open chevron, a triangle with a circle and lines, a filled triangle, a curved shape, and a red dashed triangle.