react-ctx-menu
A simple, effective, lightweight context menu with animation made for React.
To use:
Install the component in your project:
npm install react-ctx-menu --save
Import the component into your project:
;
Pass a ctxId
, and an array of menu items with icons, labels, and functions:
<CTXMenu = =/>
Where logo
is an image file imported into the parent component:
;
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.