Overview
Right-click anywhere in this area
DropdownMenu.
Installation
Usage
Variants
With Checkbox and Radio Items
Table Row Context Menu
API Reference
ContextMenuContent
ContextMenuItem
Accessibility
- Context Menu opens at the cursor position with
role="menu" ContextMenuTriggerarea does not show a visual indicator — consider adding a subtle hint for discoverability- Keyboard:
Shift+F10or the Menu key opens context menu at the focused element - All the same keyboard navigation as
DropdownMenuapplies (Arrow keys, Enter, Escape)
Do’s & Don’ts
Do
- Use Context Menu for actions directly tied to the right-clicked element
- Include keyboard shortcuts to mirror native OS conventions
- Keep items to 5–8 max — only actions relevant to that specific element
- Use on data-dense areas: table rows, file lists, canvas elements
Don't
- Don’t rely solely on right-click — always provide primary action buttons too
- Don’t use Context Menu as a main navigation mechanism
- Don’t add items that aren’t contextually relevant to the trigger area
- Don’t show a Context Menu on mobile without a fallback (long-press isn’t obvious)