An open API service indexing awesome lists of open source software.

https://github.com/amirho1/react-right-click-context-menu

React right-click context menu helps you to prevent users from having default right click also gives u a custom able menu by the way helps u to have different menu on different elements
https://github.com/amirho1/react-right-click-context-menu

browser-context-menu browser-right-click-menu context-menu contextmenu javascript react-context-menu react-right-click-menu right-click-menu typescript

Last synced: 4 months ago
JSON representation

React right-click context menu helps you to prevent users from having default right click also gives u a custom able menu by the way helps u to have different menu on different elements

Awesome Lists containing this project

README

        

# React-right-click-menu

A custom context menu with a default styles but u can modify it and set ur style

## Installation

```
npm i react-right-click-context-menu
```

also You can clone it

```
git clone https://github.com/amirho1/react-right-click-context-menu
```

then

## Installing Dependencies

```
npm i
```

## test

```
npm run test
```

## Demo

```
npm run serve
```

## Build

after getting build you need to copy the scss files in to their files in dist for example MapLI.scss and RightClickMenu.scss

```
npm run build
```

## Example

```javascript

github
,

Copy
,


checkbox
,
],
},
{
className: "demo-left",
menuList: [

linkedin
,

Paste
,

{" "}
delete
,
],
},
]}
/>
```

## Demo Example

```javascript
export default function Demo() {
return (



github
,

Copy
,


checkbox
,
],
},
{
className: "demo-left",
menuList: [

linkedin
,

Paste
,

{" "}
delete
,
],
},
]}
/>



React-right-click-menu



React right click menu is a library to help developer focus on the
main concept it supports{" "}
Typescript also
Javascript
click on sides to see the default style and behavior of menu for
further reading go to repository



Repository


Author :{" "}

{" "}
AmirHossein Salighedar






);
}
```

## Properties

| Name | Type | Description |
| ---------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| rightClickTargets | {className: string, menuList: element or string}[] | targets that we want to have contextMenu it's required and className is name of targets that library should follow them, menuList is context menu list Items |
| menuClassName | string | className of UL the (wrapper) |
| liClassName | string | className of each LI inside UL |
| preventDefaultOnWindow | boolean | by default true preventsFrom right click on window |

## License

[MIT](./LICENSE)

## Author

[Xerxes (AmirHossein Salighedar)](https://github.com/amirho1)