https://github.com/legitcode/context-menu
Replace the native right-click context menu with your own info
https://github.com/legitcode/context-menu
Last synced: 9 months ago
JSON representation
Replace the native right-click context menu with your own info
- Host: GitHub
- URL: https://github.com/legitcode/context-menu
- Owner: Legitcode
- Created: 2015-09-09T01:57:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-09T02:23:32.000Z (over 10 years ago)
- Last Synced: 2025-04-08T10:05:32.862Z (10 months ago)
- Language: JavaScript
- Homepage: http://legitcode.github.io/context-menu
- Size: 648 KB
- Stars: 30
- Watchers: 7
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##Context menu
This is a react component for overwriting right-clicks in the browser and displaying your own custom menu.
##Install
`npm install legit-context-menu`
##Example
Take a look at the [real example](http://legitcode.github.io/context-menu) first
~~~js
import ContextMenu from 'legit-context-menu';
this will show when you right-click anywhere on the page
~~~
##Props
- `onShow`: a function that will get the event from where the right click happened
- `node`: what parts of the page should the context menu work on? defaults to the whole page
That's it for now, will possibly add an option later that will allow the native right click to take place if the context menu is already active.