# react-contexify **Repository Path**: L_L_Z/react-contexify ## Basic Information - **Project Name**: react-contexify - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-14 - **Last Updated**: 2024-07-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README screenshot 2018-10-31 at 13 32 57 ![React-contexify CI](https://github.com/fkhadra/react-contexify/workflows/React-contexify%20CI/badge.svg) [![npm](https://img.shields.io/npm/dm/react-contexify.svg)]() [![npm](https://img.shields.io/npm/v/react-contexify.svg)]() [![license](https://img.shields.io/github/license/fkhadra/react-contexify.svg?maxAge=2592000)]()
![contexify](https://user-images.githubusercontent.com/5574267/100552409-500dfd80-3287-11eb-96ee-fc1d17ef50b8.gif)
## Features - Easy to set up for real, you can make it work in less than 10sec! - Super easy to customize thanks to css variables 💅 - Custom position - Sub menu support - Does not go offscreen - Dark mode 🌒 - Keyboard navigation + keyboard shortcut! - Built-in animations - Easy to test! - Written in Typescript 💪 - Tiny! (3k gzipped) Check the documentation for more! ## Documentation Go [here](https://fkhadra.github.io/react-contexify). ## Installation Using yarn ```sh $ yarn add react-contexify ``` Using npm ```sh $ npm install --save react-contexify ``` ## The gist ```js import { Menu, Item, Separator, Submenu, useContextMenu } from 'react-contexify'; import 'react-contexify/ReactContexify.css'; const MENU_ID = 'blahblah'; function App() { const { show } = useContextMenu({ id: MENU_ID, }); function handleContextMenu(event){ show({ event, props: { key: 'value' } }) } // I'm using a single event handler for all items // but you don't have too :) const handleItemClick = ({ id, event, props }) => { switch (id) { case "copy": console.log(event, props) break; case "cut"; console.log(event, props); break; //etc... } } return (

lorem ipsum blabladhasi blaghs blah

Copy Cut Disabled Reload Do something else
); } ``` ## Contribute Any idea and suggestions are welcome. Please have a look at the contributing guide. ## License React Contexify is licensed under MIT.