Popularity
4.2
-
Activity
6.0
Growing
1
22
246

Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Tags: UI Components     Menu     React     React-component     Reactjs     Contextmenu     Rightclick    
Latest version: v2.11.0

react-contextmenu alternatives and similar libraries

Based on the "Menu" category

Do you think we are missing an alternative of react-contextmenu or a related project?

Add another 'Menu' Library

README

!!! 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](//vkbansal.github.io/react-contextmenu/)

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>

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

      <ContextMenu id="some_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](./docs/usage.md) / [examples](./examples) for more details.

API

[API docs](./docs/api.md)

FAQs

[ALL FAQs](./docs/faq.md)

Who's using react-contextmenu?

Contributors

All Contributors

Changelog

For Changelog, see releases

License

[MIT](./LICENSE.md). Copyright(c) Vivek Kumar Bansal


*Note that all licence references and agreements mentioned in the react-contextmenu README section above are relevant to that project's source code only.