Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jarrodsampson/react-ctx-menu

A simple, effective, lightweight context menu with animation made for React.
https://github.com/jarrodsampson/react-ctx-menu

css es5 es6 javascript node npm package react reactjs

Last synced: 7 days ago
JSON representation

A simple, effective, lightweight context menu with animation made for React.

Awesome Lists containing this project

README

        

# react-ctx-menu

A simple, effective, lightweight context menu with animation made for React.

![menu](screen9.png "menu")

To use:

Install the component in your project:

```npm install react-ctx-menu --save```

Import the component into your project:

```javascript
import CTXMenu from 'react-ctx-menu';
```

Pass a ```ctxId```, and an array of menu items with icons, labels, and functions:

```jsx

```

Where ```logo``` is an image file imported into the parent component:

```javascript
import logo from './logo.svg';
```

The ```ctxId``` is the area in which you'd like right-click functionality. Add a unique ```id``` to your right-clickable element, and react-context-menu will be available anywhere within that element.