Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/jarrodsampson/react-ctx-menu
- Owner: jarrodsampson
- License: mit
- Created: 2017-06-24T00:34:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-24T00:40:54.000Z (over 7 years ago)
- Last Synced: 2024-10-26T05:41:27.413Z (14 days ago)
- Topics: css, es5, es6, javascript, node, npm, package, react, reactjs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/react-ctx-menu
- Size: 21.5 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.