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

@numiko/drilldown

v2.0.1

Published

A package to create a menu system enabling you to drilldown to deeper levels and navigate back up

Readme

Drilldown

The Drilldown Package provides an easy-to-use solution for creating animated, hierarchical menus using the GreenSock Animation Platform (GSAP). It allows for smooth transitions between menu levels with configurable options for customization and callbacks for advanced integrations.

Table of Contents

Features

  • Dynamic Hierarchical Menus: Easily create multi-level drilldown menus to efficiently manage complex site navigation structures.
  • GSAP Animations: Utilizes the GreenSock Animation Platform (GSAP) to provide smooth, high-performance transitions between menu levels.
  • Configurable Selectors: Customize selectors for menu items, back buttons, submenus, and more to match your HTML structure.
  • Customizable Animation Callbacks: Offers hooks for animation start and complete events at both child and parent levels, allowing for fine-tuned control over menu behavior.
  • Automatic Height Adjustment: Features a ResizeObserver to automatically adjust the height of the drilldown menu, ensuring it matches the content for a seamless user experience.
  • Lifecycle Management: Features methods for initializing and destroying drilldown instances, enabling proper setup and teardown of components to prevent memory leaks and ensure clean transitions between states.

Dependencies

  • GSAP

Installation

Install from npm:

npm install @numiko/drilldown

Usage

JS initialisation

import { Drilldown, type DrilldownOptions } from '@numiko/drilldown';

const menuElement = document.getElementById('menu') as HTMLElement;
const options: DrilldownOptions = {
  backSelector: '[data-js-menu-back]',
  nextSelector: '[data-js-menu-next]',
  submenuSelector: '[data-js-menu-container]',
  itemSelector: '[data-js-menu-item]',
};

const menu = new Drilldown(menuElement, options);
menu.init();

HTML Structure (with appropriate tailwind styles)

Note The menu markup will be generated by the menu twig template for drupal builds - this is just a basic example of the needed structure.

<div id="menu" class="overflow-hidden bg-black text-white relative top-full left-0 w-full" data-js-menu-container data-js-menu-container-level="0" aria-hidden="false">
  <ul class="flex flex-col">
    <li data-js-menu-item data-js-menu-item-level="0">
      <a class="flex gap-4 w-full text-left items-center justify-between px-9 py-7 group" href="http://www.example.com" data-js-menu-link data-js-menu-link-level="1">
      <span>Top level 1</span>
      </a>
    </li>
      <li data-js-menu-item data-js-menu-item-level="0">
        <button class="flex gap-4 w-full text-left items-center justify-between px-9 py-7 group" type="button" data-js-menu-link data-js-menu-link-level="0" data-js-menu-next aria-controls="menu_1">
            <span>Top level 2 &raquo;</span>
        </button>
        <div id="menu_1" class="invisible absolute z-10 w-full top-0" data-js-menu-container data-js-menu-container-level="1">
            <button class="flex gap-4 w-full text-left items-center justify-start px-9 py-7 group" type="button" data-js-menu-back>
              <span> &laquo; Go back</span>
            </button>
            <div>
              <a class="flex w-full text-left items-center justify-between px-9 py-7 group" data-js-menu-parent href="http://www.example.com">Top level 2</a>
            </div>
            <ul class="flex flex-col">
              <li data-js-menu-item data-js-menu-item-level="1">
                  <a class="flex gap-4 w-full text-left items-center justify-between px-9 py-7 group" href="http://www.example.com" data-js-menu-link data-js-menu-link-level="1">
                  <span>Second level 1</span>
                  </a>
              </li>
              <li data-js-menu-item data-js-menu-item-level="1">
                <button class="flex gap-4 w-full text-left items-center justify-between px-9 py-7 group" href="http://www.example.com" data-js-menu-link data-js-menu-link-level="1" data-js-menu-next aria-controls="menu_2">
                  <span>Second level 2 &raquo;</span>
                </button>
                <div id="menu_2" class="invisible absolute z-10 w-full top-0" data-js-menu-container data-js-menu-container-level="2">
                  <button class="flex gap-4 w-full text-left items-center justify-start px-9 py-7 group" type="button" data-js-menu-back>
                      <span>&laquo; Go back</span>
                  </button>
                  <div>
                      <a class="flex w-full text-left items-center justify-between px-9 py-7 group" data-js-menu-parent href="http://www.example.com">Second level 2</a>
                  </div>
                  <ul class="flex flex-col">
                      <li data-js-menu-item data-js-menu-item-level="2">
                        <a class="flex gap-4 w-full text-left items-center justify-between px-9 py-7 group" href="http://www.example.com" data-js-menu-link data-js-menu-link-level="2">
                        <span>Third level 1</span>
                        </a>
                      </li>
                  </ul>
                </div>
              </li>
              <li data-js-menu-item data-js-menu-item-level="1">
                <a class="flex gap-4 w-full text-left items-center justify-between px-9 py-7 group" href="http://www.example.com" data-js-menu-link data-js-menu-link-level="1">
                <span>Second level 3</span>
              </a>
            </li>
            </ul>
        </div>
      </li>
  </ul>
</div>

API

See documentation for more detail on how to use the package.

Release notes

v2.0.0

  • Full TypeScript integration

v1.0.0

  • Inital version created to work with SiteKit menus