Context menu
A menu of actions revealed by right-clicking (or long-pressing) a target region.
API reference
A right-click menu: a Trigger region opens a portalled popup of items, checkboxes, radios, labels, and nested submenus.
Full props on Base UI ContextMenuAnatomy
ContextMenu | Root managing the menu's open state. |
ContextMenuTrigger | The region that opens the menu on right-click. |
ContextMenuContent | Portalled, positioned popup container for items. |
ContextMenuItem | A clickable menu row (supports inset and destructive). |
ContextMenuCheckboxItem | A menu item with a check indicator for a boolean. |
ContextMenuRadioItem | A menu item with a dot indicator; use inside a RadioGroup. |
ContextMenuLabel | Muted, non-interactive heading. Must be inside a Group. |
ContextMenuSeparator | Thin divider between menu sections. |
ContextMenuShortcut | Right-aligned muted text showing a keyboard shortcut. |
ContextMenuGroup | Wraps related items. Required around a Label. |
ContextMenuPortal | Portal that renders the menu content. |
ContextMenuSub | Root for a nested submenu. |
ContextMenuSubContent | Portalled popup for a submenu. |
ContextMenuSubTrigger | A menu item that opens a submenu; shows a chevron. |
ContextMenuRadioGroup | Coordinates selection among radio items. |