Need help with react-contexify?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

fkhadra
601 Stars 85 Forks MIT License 386 Commits 25 Opened issues

Description

Add a context menu to your react app with ease

Services available

!
?

Need anything else?

Contributors list

screenshot 2018-10-31 at 13 32 57

React-contexify CI npm npm license

contexify

Documentation

Go here.

Installation

Using yarn

$ yarn add react-contexify

Using npm

$ npm install --save react-contexify

The gist

import React from 'react';
import { Menu, Item, Separator, Submenu, MenuProvider, useContextMenu } from 'react-contexify';
import 'react-contexify/dist/ReactContexify.css';

const MENU_ID = 'blahblah';

function App() { const { show } = useContextMenu({ id: MENU_ID, });

function handleContextMenu(event){ event.preventDefault(); show(event, { props: { key: 'value' } }) } const handleItemClick = ({ event, props }) => console.log(event,props);

return (

lorem ipsum blabladhasi blaghs blah


Item 1 Item 2 Disabled Sub Item 1 Sub Item 2
); }

Contribute

Any idea and suggestions are welcome. Please have a look at the contributing guide.

License

React Contexify is licensed under MIT.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.