Back to Components
Text Effects

Context Menu

Right click menu with nested submenus and keyboard navigation.

Right click here

Keyboard navigation supports arrows, Enter, and Escape.

Dependencies

  • clsx
  • tailwind-merge

Files

  • components/ui/context-menu.tsx

Installation

Using shadcn CLI

npx shadcn add context-menu --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge