react-contextmenu

WebJar for react-contextmenu

License

License

MIT
Categories

Categories

Github Development Tools Version Controls React User Interface Web Frameworks
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-vkbansal-react-contextmenu
Last Version

Last Version

2.7.0
Release Date

Release Date

Type

Type

jar
Description

Description

react-contextmenu
WebJar for react-contextmenu
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/vkbansal/react-contextmenu

Download github-com-vkbansal-react-contextmenu

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-vkbansal-react-contextmenu/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-vkbansal-react-contextmenu</artifactId>
    <version>2.7.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-vkbansal-react-contextmenu/
implementation 'org.webjars.npm:github-com-vkbansal-react-contextmenu:2.7.0'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-vkbansal-react-contextmenu/
implementation ("org.webjars.npm:github-com-vkbansal-react-contextmenu:2.7.0")
'org.webjars.npm:github-com-vkbansal-react-contextmenu:jar:2.7.0'
<dependency org="org.webjars.npm" name="github-com-vkbansal-react-contextmenu" rev="2.7.0">
  <artifact name="github-com-vkbansal-react-contextmenu" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-vkbansal-react-contextmenu', version='2.7.0')
)
libraryDependencies += "org.webjars.npm" % "github-com-vkbansal-react-contextmenu" % "2.7.0"
[org.webjars.npm/github-com-vkbansal-react-contextmenu "2.7.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : classnames jar [2.2.5,3)
org.webjars.npm : object-assign jar [4.1.0,5)

Project Modules

There are no modules declared in this project.

Project is no longer maintained

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

Versions

Version
2.7.0