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

menu-drop

v0.0.4

Published

Responsive dropdown menu

Readme

Menu Drop

Package installation

npm i menu-drop

Import menu-drop to project

Import Css

import "menu-drop/dist/menu-drop.css";

Import Js

import "menu-drop/dist/menu-drop.js";

Or

import { MenuDrop } from "menu-drop/dist/menu-drop.js";

Use inside project

  • Add class drop-container to element that wraps the menu

  • Add class drop-toggle to element that toggles the state of menu (adds class visible to container)

  • Add class drop-menu to element that contains all menu items

  • Add class drop-item to all menu items

      <div class="drop-container">
        <button class="drop-toggle">Menu Toggle</button>
        <nav class="drop-menu">
          <button class="drop-item">Menu Item 1</button>
          <button class="drop-item">Menu Item 2</button>
        </nav>
      </div>

Change basic menu styling

To change the basic styling of the menu add the variables you want to change to the :root of your css file

:root {
    --drop-menu-bg: <Background color of all menus>;
    --drop-toggle-py: <Menu toogle button padding y>;
    --drop-toggle-px: <Menu toogle button padding x>;
    --drop-item-brd-color: <Menu item border bottom color>;
    --drop-menu-minw: <Menu minimum width in tablet and desktop>;
}

Change breakpoints used in js

  • The menu changes position depending on the distance from the left and the right side of the viewport.

  • It also takes up the whole viewport size if the minumum width of the menu is wider than the viewport.

  • On window resize, if the width of the window passes a breakpoint there is an update of the position and the width of the menu.

  • If needed the breakpoints used to update the position and width of the menu can be changed.

Breakpoint small

Default breakpoint small: 480px

Breakpoint small range: 0 - 480px

Change breakpoint small

MenuDrop.setBreakpointSm(<Preferred breakpoint small size. It must be a number>);

Get breakpoint small

MenuDrop.getBreakpointSm();

Breakpoint medium

Default breakpoint medium: 1279px

Breakpoint medium range: 768px - 1279px

Change breakpoint medium

MenuDrop.setBreakpointMd(<Preferred breakpoint medium size. It must be a number>);

Get breakpoint medium

MenuDrop.getBreakpointMd();

Breakpoint large

Default breakpoint large: 1280px

Breakpoint large range: 1280px +

Change breakpoint large

MenuDrop.setBreakpointLg(<Preferred breakpoint large size. It must be a number>);

Change breakpoint large

MenuDrop.getBreakpointLg();