# 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
 []() []() []()

## 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
);
}
```
## Contribute
Any idea and suggestions are welcome. Please have a look at the contributing guide.
## License
React Contexify is licensed under MIT.