Open on any target: right-click or touch and hold
Set a target selector, and filter to limit it to matching child elements. The open and close methods show the menu at any position from your own triggers.
AI · MCP Server and Agent Skills included
Open a menu where users right-click or touch and hold, with nested submenus, icons, separators, item templates, and items that change with the target. AI assistants set it up for you from the current docs.
The menu opens at the pointer
Opens where the user right-clicks
Nested submenus
Icons, shortcuts, separators, and disabled items
Item templates
Keyboard navigation
↓↑ move → submenu Esc close
Trusted by the world’s leading companies
Now easier with AI
Coding assistants write the Context Menu setup from the current docs instead of guessing.
01For developers
The Syncfusion MCP server and Agent Skills give assistants in VS Code, Cursor, and JetBrains the current Context Menu docs and recommended patterns.
AI coding assistantMCP Server · Syncfusion React
Show Cut, Copy, Paste, Link, and New Comment when users right-click the box.
search_docs“React Context Menu menu on any target” · 2 doc sections
Excerpt: imports and sample data omitted.
+const items = [{ text: 'Cut' }, { text: 'Copy' },
+ { text: 'Paste', items: [{ text: 'Paste Special' }] },
+ { separator: true }, { text: 'Link', disabled: true },
+ { text: 'New Comment' }];
+<ContextMenuComponent target="#files" items={items} />
Documented API: target, items, separator, disabled
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Add a Share submenu with Email and Copy link, each with an icon.
search_docs“React Context Menu submenus and icons” · 2 doc sections
Excerpt: imports and sample data omitted.
{ text: 'Share', iconCss: 'e-icons e-share',
+ items: [{ text: 'Email', iconCss: 'e-icons e-mail' },
+ { text: 'Copy link', iconCss: 'e-icons e-link' }] }
Documented API: items, iconCss
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Show each menu item with a short description under its name.
search_docs“React Context Menu item templates” · 2 doc sections
Excerpt: imports and sample data omitted.
+const items = [{ text: 'Selection', description: 'Choose from options' },
+ { text: 'Yes / No', description: 'Select Yes or No' },
+ { text: 'Text', description: 'Type own answer' },
+ { text: 'None', description: 'No answer required' }];
+<ContextMenuComponent target="#editor" items={items}
+itemTemplate={(item) => <span>{item.text}<small>{item.description}</small></span>} />
Documented API: itemTemplate
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Hide Add and Edit when users right-click the notes area.
search_docs“React Context Menu items that match the target” · 2 doc sections
Excerpt: imports and sample data omitted.
+<ContextMenuComponent ref={menu} target="#target"
+ items={items}
+ beforeOpen={(e) => e.event.target.id === 'notes'
+? menu.current.hideItems(['Add', 'Edit']) :
+ menu.current.showItems(['Add', 'Edit'])} />
Documented API: beforeOpen, hideItems, showItems
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Disable Paste until something is copied, and add a Refresh item after View.
search_docs“React Context Menu enable, add, and remove items” · 2 doc sections
Excerpt: imports and sample data omitted.
menu.current.enableItems(['Paste'], false);
+menu.current.insertAfter([{ text: 'Refresh' }], 'View');
+menu.current.removeItems(['Delete']);
Documented API: enableItems, insertAfter, removeItems
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Make the menu scroll when it has more items than fit in 150 pixels.
search_docs“React Context Menu scrolling for long menus” · 2 doc sections
Excerpt: imports and sample data omitted.
+<ContextMenuComponent target="#files" items={items}
+ enableScrolling={true}
+beforeOpen={(e) => { e.element.parentElement.style.height = '150px'; }} />
Documented API: enableScrolling, beforeOpen
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Open the context menu under the More button when users click it.
search_docs“React Context Menu open and close from code” · 2 doc sections
Excerpt: imports and sample data omitted.
+<button
+ onClick={(e) => menu.current.open(e.clientY + 8, e.clientX)}>More</button>
+const items = [{ text: 'Duplicate' }, { text: 'Rename' },
+ { text: 'Download' }];
+<ContextMenuComponent ref={menu} items={items} />
+menu.current.close();
Documented API: open, close
ResultRendered in your app
AI coding assistantMCP Server · Syncfusion React
Underline the access key letters in Cut, Copy, and Paste.
search_docs“React Context Menu underlined access keys” · 2 doc sections
Excerpt: imports and sample data omitted.
+<ContextMenuComponent target="#target" items={items}
+ beforeItemRender={(args) => {
+if (args.item.text === 'Copy')
+ args.element.innerHTML = '<u>C</u>opy';
+ }} />
Documented API: beforeItemRender
ResultRendered in your app
Accessibility
The React Context Menu component follows WAI-ARIA practices, with keyboard access and screen reader support.
Screen readeraria-haspopup and aria-expanded announced as focus moves
Features in depth
Open a demo to try each one, or the docs to see the API.
Set a target selector, and filter to limit it to matching child elements. The open and close methods show the menu at any position from your own triggers.
Nest items at any depth, opened on hover or, with showItemOnClick, on click. Collision detection flips and fits submenus, and phones show nested levels in a single layer.
Add a font icon or image to items with iconCss, group items with separator lines, and set a url so an item opens a page.
The itemTemplate property renders each item with any JSX. The beforeItemRender event adds shortcuts, underlined access keys, checkboxes, or a table inside items.
Change the menu for each target in the beforeOpen event with hideItems and showItems. The enableItems, insertAfter, insertBefore, and removeItems methods update items at run time.
The animationSettings property sets a SlideDown, ZoomIn, FadeIn, or no effect with its duration and easing. With enableScrolling, long menus scroll inside a fixed height.
Attach the menu to any element or component, and handle the select event to run actions, such as opening a Dialog for the chosen item.
A separate Syncfusion Pure React component library with its own Context Menu, built for React without the EJ2 wrapper. It is not part of the EJ2 features above.
WAI-ARIA menu roles, arrow, Enter, and Esc keys, right-to-left layouts, and localization. Bootstrap 5, Tailwind CSS, Fluent, and high-contrast themes are built in, and CSS classes restyle every part.
Get started
With an AI coding assistant
Add a Syncfusion React Context Menu to my file list with Open, Rename, a Share submenu, and Delete, with icons and a separator.
By hand, in three steps
1 · Install
npm install @syncfusion/ej2-react-navigations @syncfusion/ej2-tailwind3-theme --save
2 · src/App.css
@import '../node_modules/@syncfusion/ej2-tailwind3-theme/styles/context-menu/index.css';
3 · src/App.tsx
import { ContextMenuComponent } from '@syncfusion/ej2-react-navigations';
import './App.css';
const items = [
{ text: 'Open', iconCss: 'e-icons e-folder-open' },
{ text: 'Rename', iconCss: 'e-icons e-edit' },
{ separator: true },
{ text: 'Delete', iconCss: 'e-icons e-trash' },
];
export default function App() {
return (
<>
<div id="files">Right-click here</div>
<ContextMenuComponent target="#files" items={items} />
</>
);
}
Works withReact 15.5.4 or laterTypeScript and JavaScriptNext.jsRemixGatsbyVitePreactSystem requirements
Customer reviews
“Awesome, enough said”
Easy usability, solving real-life problems, easy to implement. Most of the cases have the operators and settings possibilities you need right away.
“A giant framework with great pricing options”
I have loved the components and options that Syncfusion has; besides, its documentation, demos, and support are excellent.
Customer story · Igniatek
“I would definitely recommend Syncfusion for anyone who is trying to develop something meaningful.”
Somnath Maji, Founder, Igniatek Consultancy
Including the 2026 Devies Award, Capterra Shortlist 2026, Software Advice FrontRunners 2026, and G2 Best Software 2025.
Complete feature list
Showing all 34 features. Each one opens its demo or documentation.
No feature matches that search. Try another word, or open the Context Menu demos.
Related navigation components:React Menu BarReact ToolbarReact Ribbon
Questions and answers
The Syncfusion React Context Menu is a popup menu that opens at the pointer when users right-click, or touch and hold, a target element. It lists the actions for that element. Explore the demos
The Context Menu opens on demand at the pointer for a specific element. The Menu Bar stays visible as a horizontal or vertical bar of app commands. React Menu Bar
Install @syncfusion/ej2-react-navigations and the Tailwind 3 theme, then render ContextMenuComponent with a target selector and an items array. The getting started section on this page shows each step. Read the getting started guide
Yes. It opens when users touch and hold the target, and on phones nested items show in a single layer. Read about nesting
Yes. Give an item its own items array to nest submenus at any depth, opened on hover or, with showItemOnClick, on click. Read about multilevel nesting
Yes. Set iconCss on an item for a font icon or image, and add an item with separator set to true to group items. Read about icons
Yes. Use itemTemplate to render items with any JSX, or the beforeItemRender event to add shortcuts or components to items. Template demo
Yes. In the beforeOpen event, read the target and call hideItems or showItems to fit the menu to it. Read about dynamic items
Yes. Call enableItems to enable or disable items, and insertAfter, insertBefore, or removeItems to change the list. Read about adding and removing items
Yes. Call open with top and left coordinates to show the menu anywhere, and close to hide it. Read about opening from code
Yes. It follows WAI-ARIA practices and WCAG 2.2, with arrow, Enter, and Esc keys, screen reader support, and right-to-left layouts. Read about accessibility
Yes. The Syncfusion MCP server and Agent Skills give assistants in VS Code, Cursor, and JetBrains the current Context Menu docs and recommended patterns. You need a Syncfusion API key and an active license, which can be a commercial, Community, or trial license. Set up the MCP server
It is a commercial component with a 30-day free trial. A free Community License is available for companies and individuals with less than $1 million USD in annual gross revenue, five or fewer developers, and 10 or fewer total employees. Check Community License eligibility
Resources
Context Menu for other frameworks:AngularBlazorJavaScriptVue
More React components:Menu BarToolbarRibbonAll 140+ React components
Syncfusion React Context Menu
The full Context Menu, the MCP server, and Agent Skills, free for 30 days.