Components

Context menu

Right-click (or long-press) menu attached to any element. Same compound API as DropdownMenu, but triggered by contextmenu event instead of a button click.

Updated Jul 10, 2026 by Leonardo Posada

Variants

Right-click here
<ContextMenu>
  <ContextMenuTrigger>Right-click the block</ContextMenuTrigger>
  <ContextMenuContent>
    <ContextMenuLabel>Row</ContextMenuLabel>
    <ContextMenuItem>Open</ContextMenuItem>
    <ContextMenuItem>Duplicate</ContextMenuItem>
    <ContextMenuSeparator />
    <ContextMenuItem>Delete</ContextMenuItem>
  </ContextMenuContent>
</ContextMenu>

When to use

  • Row actions in tables (right-click a row to reveal edit/delete).
  • Secondary actions on cards or list items.

When not to use

  • As the primary way to reveal actions — most users don't right-click.
  • On touch-only prototypes — no right-click there.

Usage

Do
  • Mirror the same options as the row's kebab dropdown so both entry points behave the same.
Don't
  • Don't hide critical actions only in the context menu.
  • Don't nest more than one submenu.