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/nav-list

v3.0.0

Published

Horizontal navigation list web component with selection support

Downloads

16

Readme

@manufosela/nav-list

Horizontal navigation list web component with selection support. Built with Lit.

Installation

npm install @manufosela/nav-list

Usage

import '@manufosela/nav-list';
<nav-list id="menu" title="Select Option"></nav-list>

<script>
  const menu = document.getElementById('menu');
  menu.listValues = ['Option 1', 'Option 2', 'Option 3'];
  menu.addEventListener('navlist-changed', (e) => {
    console.log('Selected:', e.detail.value);
  });
</script>

Features

  • Horizontal navigation list with selection
  • Light DOM support (define items in HTML)
  • Keyboard navigation (Enter/Space)
  • External event control (next/previous)
  • Fixed (read-only) mode
  • CSS custom properties for theming
  • Accessible (ARIA radiogroup)

Attributes

| Attribute | Type | Default | Description | | --------------- | ------- | ------- | ---------------------------------------- | | title | String | '' | Title displayed above the list | | selected | String | null | Currently selected value | | fixed | Boolean | false | If true, selection is disabled | | listen-events | Boolean | false | Listen for navlist-next/navlist-last events |

Properties

| Property | Type | Description | | ------------ | -------- | -------------------------- | | listValues | String[] | Array of values to display |

Methods

| Method | Description | | ------ | ----------- | | - | Use events for programmatic control |

Events

| Event | Detail | Description | | ----------------- | ------------------------- | -------------------------- | | navlist-changed | { value, pos, id } | Fired when selection changes |

Light DOM Usage

Define items directly in HTML:

<nav-list title="Categories">
  <ul>
    <li>Electronics</li>
    <li>Clothing</li>
    <li>Books</li>
  </ul>
</nav-list>

Event-driven Navigation

Control selection programmatically:

<nav-list id="pages" listen-events></nav-list>

<script>
  // Go to next item
  document.dispatchEvent(new CustomEvent('navlist-next', {
    detail: { id: 'pages' }
  }));

  // Go to previous item
  document.dispatchEvent(new CustomEvent('navlist-last', {
    detail: { id: 'pages' }
  }));
</script>

CSS Custom Properties

| Property | Default | Description | | --------------------------------- | -------------------- | ------------------------ | | --nav-list-gap | 5px | Gap between items | | --nav-list-padding | 10px 20px | Item padding | | --nav-list-font-size | 14px | Font size | | --nav-list-letter-spacing | 2px | Letter spacing | | --nav-list-border-radius | 4px | Border radius | | --nav-list-border-color | transparent | Border color | | --nav-list-bg | transparent | Background color | | --nav-list-hover-bg | rgba(0,0,0,0.05) | Hover background | | --nav-list-selected-border-color| #cc3743 | Selected border color | | --nav-list-selected-bg | transparent | Selected background | | --nav-list-selected-color | inherit | Selected text color | | --nav-list-focus-color | #3b82f6 | Focus ring color | | --nav-list-title-size | 16px | Title font size | | --nav-list-title-weight | 700 | Title font weight | | --nav-list-title-color | inherit | Title color |

Styling Examples

Pill Style

nav-list {
  --nav-list-selected-border-color: transparent;
  --nav-list-selected-bg: #3b82f6;
  --nav-list-selected-color: white;
  --nav-list-border-radius: 999px;
  --nav-list-padding: 8px 20px;
}

Underline Style

nav-list {
  --nav-list-border-radius: 0;
  --nav-list-selected-border-color: transparent;
  --nav-list-padding: 10px 16px;
}
nav-list .navlist__item--selected {
  border-bottom: 2px solid #3b82f6;
}

License

Apache-2.0