npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

neko-context-menu

v3.0.1

Published

Open a contextual menu on elements.

Readme

Neko Context Menu

alt Preview

Intallation

Install package

npm install neko-context-menu --save

Import add this lines to your CSS

@import path/to/neko-context-menu.scss;

You can change colors with the scss variable :

 $neko-context-menu-color: #343A40 !default;
 $neko-context-menu-background-color: #FFFFFF !default;

Import in your project :

With js compiler like WebPack :

// Vanilla Javascript
import NContextMenu from 'neko-context-menu'

// JQuery
import 'path/to/jquery-neko-context-menu'

Usage

<div data-context>
    <h1>Neko Context Menu</h1>
    <p>Faites un clique droit pour ajouter des éléments</p>
</div>
import NContextMenu from 'neko-context-menu'

const targets = document.querySelectorAll('[data-context]')

// Vanilla javascript
targets.forEach(target => {

    // Instanciate Context Menu
    let contextMenu = new NContextMenu(target)

    // Create a menu item
    let item = new MenuItem('Title', (evt, target) => console.log("MY TEST", evt, target))
    let item2 = new MenuItem('Title 2', (evt, target) => console.log("MY TEST 2", evt, target))
    let item3 = new MenuItem('Title 3', (evt, target) => console.log("MY TEST 3", evt, target))

    // Add menu item to the context menu
    contextMenu.add(item)
    contextMenu.add(item2)
    contextMenu.add(item3)

    // Remove the item from the context menu
    contextMenu.remove(item)

})

// JQuery Plugin
$('[data-context]').NContextmenu([
    {
        label: "File",
        icon: '<i class="far fa-copy"></i>',
        callback(evt, target, item) {
            console.log("file", evt, target, item)
        }
    },
    {
        label: "Directory",
        icon: '<i class="far fa-folder"></i>',
        callback(evt, target, item) {
            console.log("directory", evt, target, item)
        }
    },
    {
        label: "Remove",
        icon: '<i class="far fa-trash-alt"></i>',
        callback(evt, target, item) {
            console.log("remove", evt, target, item)
        }
    },
])

Options

items

Type: Array Required Array of object. Each object is a section of your contextual menu and fonctionnality.

{
    name: 'New folder', // Name of the option => REQUIRED
    callback: function(evt, target, item) {
        /**
         * evt -> event captured
         * target -> the element that opened the context menu
         * item -> the menu item object
         * REQUIRED
        */
    },
    icon: '<i class="fas fa-folder"></i>' // OPTIONNAL
}

The icon key is optionnal. In this example, I am using classes of FontAwesome.