Skip to content

Repository files navigation

!!! Looking for maintainers !!!

NPM versionBuild StatusDependency StatusDev Dependency StatusCode 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

importReactfrom"react";importReactDOMfrom"react-dom";import{ContextMenu,MenuItem,ContextMenuTrigger}from"react-contextmenu";functionhandleClick(e,data){console.log(data.foo);}functionMyApp(){return(<div><ContextMenuTriggerid="some_unique_identifier"><divclassName="well">Right click to see the menu</div></ContextMenuTrigger><ContextMenuid="some_unique_identifier"><MenuItemdata={{foo: 'bar'}}onClick={this.handleClick}>
ContextMenu Item 1
</MenuItem><MenuItemdata={{foo: 'bar'}}onClick={this.handleClick}>
ContextMenu Item 2
</MenuItem><MenuItemdivider/><MenuItemdata={{foo: 'bar'}}onClick={this.handleClick}>
ContextMenu Item 3
</MenuItem></ContextMenu></div>);}ReactDOM.render(<MyAppmyProp={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

About

Context Menu implemented in React

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages