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

@reactfast/nav

v0.2.24

Published

Composable React navigation bars, headers, and footers with Headless UI.

Readme

🧭 @reactfast/nav

Composable React navigation bars, headers, and footers.

npm version License: MIT Build Contributions welcome

GitHub


Installation

npm install @reactfast/nav
# or
yarn add @reactfast/nav

Peer dependencies (not bundled): react, react-dom, @headlessui/react, @heroicons/react, react-icons.


Quick Start (FastNav)

FastNav (Default Navigation)

FastNav is a single component that renders a responsive navigation bar driven by a JSON-like config.

Note: FastNav uses next/link. Use in a Next.js project.

Usage

import { FastNav } from "@reactfast/nav";

const config = { menuItems: [{ title: "Home", href: "/", useLink: true }] };

export default function Header() {
  return <FastNav config={config} />;
}

Concepts

  • Menu items (top-level)

    const config = {
      menuItems: [
        { title: "Home", href: "/", useLink: true },
        { title: "About", href: "/about", useLink: true },
        { title: "Contact", href: "/contact", useLink: true },
      ],
    };
  • Submenus

    Add a subMenu array to any item for a flyout. Use full: true for a full-width panel; omit (or set type: "simple") for a compact flyout.

    const config = {
      menuItems: [
        {
          title: "Services",
          href: "/services",
          useLink: true,
          // full-width flyout
          full: true,
          subMenu: [
            { title: "Repair", href: "/services/repair", useLink: true },
            { title: "Install", href: "/services/install", useLink: true },
          ],
        },
      ],
    };
  • Submenu CTAs (optional)

    Add a ctas array to append call-to-action links at the bottom of full-width flyouts.

    const config = {
      menuItems: [
        {
          title: "Services",
          href: "/services",
          useLink: true,
          full: true,
          subMenu: [
            { title: "Install", href: "/services/install", useLink: true },
          ],
          ctas: [
            { title: "Call", href: "tel:0000000000" },
            { title: "Contact", href: "/contact" },
          ],
        },
      ],
    };
  • Login and Top-level CTA (header right side)

    const config = {
      login: true,
      loginHref: "/login",
      cta: true,
      ctaTitle: "Get Started",
      ctaBtnHref: "/signup",
    };
  • Sticky header and brand

    const config = {
      sticky: true, // stick to top on scroll
      logo: "/logo.png", // optional image logo
      logoAlt: "Brand",
      fallbackText: "Brand", // text shown if no image
    };
  • Search modal (optional)

    import { NavController } from "@reactfast/nav";
    import { useMemo, useState } from "react";
    
    export default function Header() {
      const [results, setResults] = useState([]);
    
      const config = useMemo(
        () => ({
          menuItems: [{ title: "Home", href: "/", useLink: true }],
        }),
        [],
      );
    
      const handleSearchChange = async (query) => {
        if (!query.trim()) {
          setResults([]);
          return;
        }
    
        const response = await fetch(
          `/api/search?q=${encodeURIComponent(query)}`,
        );
        const data = await response.json();
        setResults(data.items || []);
      };
    
      return (
        <NavController
          baseConfig={config}
          quickSearchResults={results}
          onSearchChange={handleSearchChange}
          onClearQuickResults={() => setResults([])}
        />
      );
    }

    NavController now keeps the search UI internal, but the data flow external:

    • quickSearchResults: results to render in the modal
    • onSearchChange(query): called whenever the field changes
    • onSearch(query): optional override for submit behavior
    • onSearchOpenChange(open): optional modal open/close callback
    • onClearQuickResults(): optional callback when the modal closes or a result is selected

    See src/examples/navAndSearch.jsx for a small mocked example you can adapt to Sanity, Algolia, or your own API.


Features

  • Responsive, accessible navigation built on Headless UI
  • Dark/light variants and mobile-friendly menus
  • Heroicons and React Icons support
  • Tailwind-ready markup

Contributing

We welcome pull requests and feature suggestions. See CONTRIBUTING.md.


License

Licensed under the MIT License. © 2025 Jonathon McClendon