2.14.0 • Published 4 years ago

react-contextmenu v2.14.0

Weekly downloads
47,644
License
MIT
Repository
github
Last release
4 years ago

!!! Looking for maintainers !!!

NPM version Build Status Dependency Status Dev Dependency Status Code Climate

NPM

React Contextmenu

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

Table of contents

Installation

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

Usage

Simple example

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

function handleClick(e, data) {
  console.log(data.foo);
}

function MyApp() {
  return (
    <div>
      {/* NOTICE: id must be unique between EVERY <ContextMenuTrigger> and <ContextMenu> pair */}
      {/* NOTICE: inside the pair, <ContextMenuTrigger> and <ContextMenu> must have the same id */}

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

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

    </div>
  );
}

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

see usage docs / examples for more details.

API

API docs

FAQs

ALL FAQs

Who's using react-contextmenu?

Contributors

All Contributors

Changelog

For Changelog, see releases

License

MIT. Copyright(c) Vivek Kumar Bansal

@development-framework/explorer@ai-workspace/canvasemsysminsilo-react-clienthiglass-galaxyoneview-guijuno-uimotor-uimircoai-guimattermost-webapp-libxr3-spokexrchat-spokescratch-gui-freerangemdt-lib@infinitebrahmanuniverse/nolb-react-conglitchyscratch-guiscratch-gui@everything-registry/sub-chunk-2547linqstream-moduleslidezhushouhsop-front-app-platformhh-cloudhiglass-ithiglass-no-github-depsketcher-react-customketcher-react-shuzhangkf-gridkonakkulbot-guiimages-galleryitch-scratch-guijollofnodesjman-react-componentsmikes-bad-react-data-gridmicrofrontend-frameworkmscratchjylibnative-menunative-menu-modernmetadata-externalmengli-react-filemanagerminecraft-storeys-scratch-guimathingmaterial-sonmcashscan-frontendedp-react-spa-starterelyra-canvas-fixdxq-grid-addonsfenestrojfinder-reactfosun-microfrontendfosun-mincrofrontendethfsplorerr-grid-addons-v6pw-components@tunglx/react-filemanagerpixorepolestar-echartsportlet-builder-uireact-data-grid-r15react-data-grid-addonsreact-data-grid-addons-default-filtersreact-data-grid-addons-defaultvaluesreact-data-grid-addons-pcsreact-data-grid-addons-rollunreact-filemanager-radreact-fs-treeviewopenblock-guireact-omni-tablepipesort-admin-templaterui-npmscreenv-tablezrr-we-common@hapticsynaptic/braceletmaker-gui@emsipl/react-data-grid-addons@gtiot/iot-dashboard@gui-one/react-settings-form@gwaapp/easexod-client@icedesign/table-context-menu-block@forcewin/mir-chat-response-managevertx-uivertx-zerovh-sheet-testvh-spreadsheettowneditor-guitranslation_tool-lxwang2tree-render-viewertypescript-react-table-custom@mirzadipradhana/react-data-grid@knd/react-gridwawu-scratch-guixu-react-componentszero-izero-ux@lianmed/lmg@lum-ai/react-tag@luisbringitps/react-chat-widget@nocp/ferrumxadmin-dashboard
2.14.0

4 years ago

2.13.0

4 years ago

2.12.0

4 years ago

2.11.0

5 years ago

2.10.0

5 years ago

2.9.4

5 years ago

2.9.3

6 years ago

2.9.2

6 years ago

2.9.2-alpha.1

6 years ago

2.9.1

6 years ago

2.9.0

6 years ago

2.8.1

6 years ago

2.8.0

6 years ago

2.7.0

7 years ago

2.6.5

7 years ago

2.6.4

7 years ago

2.6.3

7 years ago

2.6.2

7 years ago

2.6.1

7 years ago

2.6.0

7 years ago

2.5.2

7 years ago

2.5.1

7 years ago

2.5.0

7 years ago

2.4.1

7 years ago

2.4.0

7 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

2.0.0-beta.2

7 years ago

2.0.0-beta.1

7 years ago

2.0.0-alpha.2

7 years ago

2.0.0-alpha.1

7 years ago

1.6.3

8 years ago

1.6.2

8 years ago

1.6.1

8 years ago

1.6.0

8 years ago

1.5.0

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.0

9 years ago