
Security News
NVD Quietly Sweeps 100K+ CVEs Into a “Deferred” Black Hole
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
react-ultimate-contextmenu
Advanced tools
React-component allows you to replace the browser context menu with your own
By npm
$ npm install react-ultimate-contextmenu
By Yarn
$ yarn add react-ultimate-contextmenu
This simple example demonstrate different cases:
import React, { Fragment } from 'react'
import { FaPhoneSquare } from 'react-icons/fa'
import {
MenuProvider,
Menu,
MenuItem,
Submenu,
MenuFilter,
Separator
} from 'react-ultimate-contextmenu'
const MyAwesomeComponent = ({ doSomethingAwesome, supportList, callSupport }) =>
<MenuProvider>
This is my awesome component
<Menu>
<MenuItem href='https://my-awesome-site.com' target='_blank'>Go to my awesome site!<MenuItem>
<MenuItem onClick={doSomethingAwesome}>Do something awesome!<MenuItem>
{supportList.length && <Fragment>
<Separator />
<Submenu icon={<FaPhoneSquare />} label='Support...'>
<MenuFilter available={supportList.length > 10}></MenuFilter>
{supportList.map((item, index) =>
<MenuItem key={index} onClick={() => { callSupport(index) }}>
Call support {index + 1}
</MenuItem>
)}
</Submenu>
</Fragment>}
</Menu>
</MenuProvider>
export default MyAwesomeComponent
This component define a context menu swap scope. It catches the contextmenu
event and displays the child Menu component.
This is the main container for context menu elements.
Single menu item like button or link. By default this is button, but if you define prop href
it will be a link and you can define all available link's props.
click
eventContainer for submenu elements.
Filter of menu items
Dividing line between menu items.
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
Research
Security News
Lazarus-linked threat actors expand their npm malware campaign with new RAT loaders, hex obfuscation, and over 5,600 downloads across 11 packages.
Security News
Safari 18.4 adds support for Iterator Helpers and two other TC39 JavaScript features, bringing full cross-browser coverage to key parts of the ECMAScript spec.