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-guimotor-uimircoai-guimattermost-webapp-libxr3-spokexrchat-spokescratch-gui-freerangemdt-lib@infinitebrahmanuniverse/nolb-react-conglitchyscratch-gui@everything-registry/sub-chunk-2547blockzie-guitbc-common-gridxadmin-dashboardshan-scratch-guishayder-pacscalez-guiscratchhw-guiscratch-guiscratch-gui-cntscratch-gui-groundhogscratch-gui-liaoscratch-gui-okagvscratch-gui-pearupscratch-arduino-guiscreenv-tablereact-watertablerfmcsuny-guispoke-clispoke-test-cliversaweb-forms-sandboxvertx-zerovertx-uiscratch-gui-astromikes-bad-react-data-gridminecraft-storeys-scratch-guimengli-react-filemanagermetadata-externallinqstream-moduleslidezhushouitch-scratch-guijman-react-componentsmcashscan-frontendmicrofrontend-frameworkketcher-react-customketcher-react-shuzhangkonakkulbot-guihh-cloudhiglass-ithiglass-no-github-depshsop-front-app-platformimages-gallerygovin-guikf-gridjylibjollofnodesmscratchmaterial-sonmathingopenblock-guiportlet-builder-uipolestar-echartspool-scratch-guipixorepipesort-admin-templatepw-componentsreact-data-grid-addons-default-filtersreact-data-grid-addons-defaultvaluesreact-data-grid-addons-pcsreact-data-grid-addons-rollunreact-data-grid-addonsreact-data-grid-r15r-grid-addons-v6react-fs-treeviewreact-filemanager-radreact-omni-tablenative-menunative-menu-modernreact-svg-arrowsreact-tree-table-optimizedreact-table-contextmenuredux-spreadsheetsrvup-playerrobopro-guirollun-react-data-grid-addonsrui-npmtypescript-react-table-customtowneditor-guitrioslibtree-render-viewertranslation_tool-lxwang2@anew/ui@alcacoop/react-filemanager
2.14.0

4 years ago

2.13.0

5 years ago

2.12.0

5 years ago

2.11.0

6 years ago

2.10.0

6 years ago

2.9.4

6 years ago

2.9.3

6 years ago

2.9.2

7 years ago

2.9.2-alpha.1

7 years ago

2.9.1

7 years ago

2.9.0

7 years ago

2.8.1

7 years ago

2.8.0

7 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

8 years ago

2.6.0

8 years ago

2.5.2

8 years ago

2.5.1

8 years ago

2.5.0

8 years ago

2.4.1

8 years ago

2.4.0

8 years ago

2.3.1

8 years ago

2.3.0

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

2.0.0-beta.2

8 years ago

2.0.0-beta.1

8 years ago

2.0.0-alpha.2

8 years ago

2.0.0-alpha.1

8 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

9 years ago

1.4.0

9 years ago

1.3.0

9 years ago

1.2.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.0

10 years ago