←Back to docs
Recipe
Context Menu
Right-click interactions that surface contextual actions without cluttering the primary UI. Built for power users who expect instant access to copy, inspect, and navigate.
Structure
Copy value⌘C
Inspect element
Open in new tab
Delete
Positioning
Anchor the menu to the cursor position on right-click. Use fixed positioning with a small offset to prevent the menu from rendering under the cursor. Clamp to viewport edges so the menu never overflows.
Origin
clientX, clientY
Dismiss
Esc / click outside
States
DefaultHoverDisabledDestructive