Skip to content

Context menu

Opens actions for an item on right-click, long press, or keyboard.

Right-click or long-press the file.

context-menu-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Composition

  • ContextMenuTrigger

    On the keyboard, press Shift+F10. On macOS, press Control+Enter.

    • Button

      It must be focusable.

    • ContextMenu
      • ContextMenuItemRepeats

Grouped actions

context-menu-grouped-demo.tsx

API reference

Context menu takes the props of React Aria Menu (opens in a new tab).