Skip to content
Context Menu implemented in React
Branch: master
Clone or download
vkbansal Merge pull request #264 from zmayor/master
enhanced submenu typescript definition
Latest commit 155f4fc Mar 25, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs #240 Oct 30, 2018
examples Add rtl prop to the ContextMenu Component Oct 17, 2018
src enhanced submenu typescript definition Mar 21, 2019
tests Add rtl prop to the ContextMenu Component Oct 17, 2018
.babelrc remove react-hmre and use static server instead Feb 20, 2017
.codeclimate.yml exclude markdown files Aug 4, 2017
.eslintrc.yml Lint Fixes Mar 26, 2017
.gitignore Updated gitignore Jul 24, 2018
.travis.yml update travis deploy settings Apr 6, 2018 Add Mar 31, 2017 use jsfiddle with recent versions (#175) Dec 8, 2017 init Jul 4, 2015 Update Feb 5, 2019
package-lock.json 2.11.0 Mar 18, 2019

!!! Looking for maintainers !!!

NPM version Build Status Dependency Status Dev Dependency Status Code Climate


React Contextmenu

ContextMenu in React with accessibility support. Live Examples can be found here

Table of contents


Using npm

npm install --save react-contextmenu

Using yarn

yarn add react-contextmenu

Browser Support

  • IE 11 and Edge >= 12
  • FireFox >= 38
  • Chrome >= 47
  • Opera >= 34
  • Safari >= 8


Simple example

import React from "react";
import ReactDOM from "react-dom";
import { ContextMenu, MenuItem, ContextMenuTrigger } from "react-contextmenu";

function handleClick(e, data) {

function MyApp() {
  return (

      <ContextMenuTrigger id="some_unique_identifier">
        <div className="well">Right click to see the menu</div>

      <ContextMenu id="some_unique_identifier">
        <MenuItem data={{foo: 'bar'}} onClick={this.handleClick}>
          ContextMenu Item 1
        <MenuItem data={{foo: 'bar'}} onClick={this.handleClick}>
          ContextMenu Item 2
        <MenuItem divider />
        <MenuItem data={{foo: 'bar'}} onClick={this.handleClick}>
          ContextMenu Item 3


ReactDOM.render(<MyApp myProp={12}/>, document.getElementById("main"));

see usage docs / examples for more details.


API docs



Who's using react-contextmenu?


All Contributors


For Changelog, see releases


MIT. Copyright(c) Vivek Kumar Bansal

You can’t perform that action at this time.