
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
modern-context
Advanced tools
A modern, beautiful, and lightweight context menu JavaScript library inspired by Fluent Design.
A modern, beautiful, and lightweight context menu JavaScript library inspired by Fluent Design.

ModernContext.js supports dark mode. If your browser is set to dark mode, the context menu will automatically switch to the black-based design.

See the documentation for more information.
npm install modern-context
import { Context } from "modern-context";
import { Context } from "./dist/modern-context.min.js"
const contents = [
{
type: "item",
label: "Alert",
callback: () => {
alert("Clicked!");
}
},
{
type: "separator"
},
{
type: "item",
label: "No Callback"
}
];
const context = new Context("#target", contents);
| Property | Default | Description |
|---|---|---|
| --mc-text-color | #333333 (white in dark mode) | Text color in the context menu. |
| --mc-background-color | rgba(255, 255, 255, 0.7) (rgba(51, 51, 51, 0.7) in dark mode) | Background color of the context menu. |
| --mc-corner-radius | 0.25em | Corner radius size of the context menu. |
| --mc-font-family | sans-serif | Font family of text. |
The following browsers are supported. ModernContext.js may work in other modern browsers, but I tested only the following browsers.
npm install
npm run build
npm run doc
FAQs
A modern, beautiful, and lightweight context menu JavaScript library inspired by Fluent Design.
We found that modern-context demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.