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

@the_blank/menumaker

v2.0.0

Published

Easily create menu for browser with this package.

Readme

Menu Maker

Easily create menu for browser

In order to use this package you will need to do the following:

Import the function from the module with import menuMaker from '@the_blank/menumaker';.

create a item DOM container for your menu items.

create a button for menu to load and unload.

Then you will need to call the menuMaker function with a config object.

The config object needs the following data:

  • items: array of the items of the menu. The items should be objects containing details for the items
    • text: the text shown as the menu item
    • onclick(optional): function to execute when item is clicked
    • href(optional): link to redirect when the item is clicked
    • target(optional): the target parameter for the link. Example: '_blank' for new tab
  • itemsClass: the styling class for each of the items
  • itemContainer: container DOM element where the items will be pushed to
  • multiline(optional): by default its value is true. If true, a html<br> tag is added after each item

Example:

import menuMaker from '@the_blank/menumaker';

const menuContainer = document.querySelector('#dropdown');
const button = document.querySelector('#button');
const menu = menuMaker({
    itemContainer: menuContainer,
    items: [
        {text: 'Colors', onclick: () => {alert('hello xD')}},
        {text: 'Animals', href: 'https://github.com', target: '_blank'},
        {text: 'Birds', href: 'https://duckduckgo.com/?t=ffab&q=birds&iax=images&ia=images', target: '_blank'}
    ],

});

button.onclick = menu.toggleView;

Styling can be done to the items by refering to the anchor tags under the container. Example:

#dropdown {
    width: max-content;
    min-width: 5em;
    border: 1px solid black;
    z-index: 2;
    position: absolute;
    background-color: white;
}
#dropdown > a {
    margin:0;
}

You can create a basic menu like below or modify it to be way better. Basic-menu Basic-menu-after-click

Github

NOTICE: I apologize to those who downloaded it before version 2.0.0. It was incomplete and didnt work. I should have mentioned it in the README. I'm sorry for the inconvenience.