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

@manufosela/header-nav

v2.0.0

Published

Responsive header navigation web component with hamburger menu

Downloads

25

Readme

@manufosela/header-nav

Responsive header navigation web component with hamburger menu. Built with Lit.

Installation

npm install @manufosela/header-nav

Usage

import '@manufosela/header-nav';
<header-nav logo="logo.png">
  <a href="/">Home</a>
  <a href="/about">About</a>
  <a href="/contact">Contact</a>
</header-nav>

Features

  • Responsive hamburger menu
  • Logo image or custom slot
  • Mobile overlay
  • Sticky positioning
  • Customizable breakpoint
  • CSS custom properties for theming
  • Accessible (ARIA attributes)

Attributes

| Attribute | Type | Default | Description | | ------------------- | ------- | ------- | ------------------------------- | | logo | String | '' | Logo image URL | | logo-alt | String | 'Logo'| Logo alt text | | logo-href | String | '/' | Logo link URL | | sticky | Boolean | false | Make header sticky | | mobile-breakpoint | Number | 768 | Breakpoint for mobile menu (px) |

Slots

| Slot | Description | | ----------- | ------------------------------------ | | (default) | Navigation links | | logo | Custom logo content | | logo-text | Text logo (used when no logo image) | | mobile | Additional mobile-only content |

Events

| Event | Detail | Description | | ------------- | ------------- | ------------------------- | | menu-toggle | { open } | Fired when menu toggles |

Examples

Basic

<header-nav logo="logo.png">
  <a href="/">Home</a>
  <a href="/about">About</a>
  <a href="/contact">Contact</a>
</header-nav>

Text Logo

<header-nav>
  <span slot="logo-text" style="font-weight: bold; font-size: 1.5rem;">MyBrand</span>
  <a href="/">Home</a>
  <a href="/products">Products</a>
</header-nav>

Custom Logo Slot

<header-nav>
  <div slot="logo">
    <img src="icon.svg" width="32" />
    <span>Company Name</span>
  </div>
  <a href="/">Home</a>
</header-nav>

Sticky Header

<header-nav logo="logo.png" sticky>
  <a href="/">Home</a>
  <a href="/about">About</a>
</header-nav>

Custom Breakpoint

<header-nav logo="logo.png" mobile-breakpoint="1024">
  <a href="/">Home</a>
  <a href="/about">About</a>
  <a href="/services">Services</a>
  <a href="/portfolio">Portfolio</a>
  <a href="/contact">Contact</a>
</header-nav>

Dark Theme

<header-nav
  logo="logo-white.png"
  style="--header-bg: #1e293b; --header-link-color: #e2e8f0; --header-link-hover: #3b82f6;"
>
  <a href="/">Home</a>
  <a href="/about">About</a>
</header-nav>

Event Handling

const headerNav = document.querySelector('header-nav');

headerNav.addEventListener('menu-toggle', (e) => {
  console.log('Menu is', e.detail.open ? 'open' : 'closed');
});

CSS Custom Properties

| Property | Default | Description | | --------------------- | ------------------------------- | ------------------ | | --header-height | 60px | Header height | | --header-bg | #fff | Background color | | --header-shadow | 0 2px 4px rgba(0,0,0,0.1) | Box shadow | | --header-link-color | #374151 | Link color | | --header-link-hover | #3b82f6 | Link hover color |

Styling Example

header-nav {
  --header-height: 70px;
  --header-bg: linear-gradient(135deg, #667eea, #764ba2);
  --header-link-color: white;
  --header-link-hover: #fbbf24;
  --header-shadow: none;
}

Compared to Original

| Feature | Original | New | | ------- | -------- | --- | | Lit version | Lit 2.x | Lit 3.x | | Dependencies | mixin-getlightdom | None | | Mobile menu | Checkbox hack | JavaScript | | Overlay | No | Yes | | Breakpoint | CSS-based | Configurable | | Sticky | No | Yes | | Events | No | Yes | | Tests | Basic | Comprehensive |

License

Apache-2.0