Context MenuNew

A right-click (or long-press) menu that opens at the pointer position with origin-aware unfurl, proximity highlight, and keyboard-shortcut hints.

Dependencies

motion

Interaction Type

Right-click or long-press to open. The menu unfurls from the cursor position. Arrow keys navigate, Enter selects, Escape closes.

Props

Options you can pass to customize this component.

Prop
Type
Description
items*
ContextMenuItem[]

The menu items.

children*
ReactNode

The trigger region.

disabled
boolean

Disable the context menu.

Installation

npx shadcn@latest addhttps://ui.nexvyn.dev/r/context-menu.json

How to use

<ContextMenu items={[{ label: 'Copy', shortcut: '⌘C' }, { label: 'Delete', destructive: true }]}>
  <div>Right-click me</div>
</ContextMenu>

Source Code

Click the code icon in the top-right corner to view the source code.

Contact

Questions or feedback? Reach out anytime.

License & Usage

  • Free for personal and commercial use
  • No attribution required
  • Cannot be resold as a standalone product
  • Anatomy/blueprint diagrams are licensed separately (CC BY-NC 4.0) and are not for commercial use
// No code loaded.
Right-click me
npx shadcn@latest addhttps://ui.nexvyn.dev/r/context-menu.json