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

@lilydesignsystem/nunjucks-link-picker

v0.2.0

Published

Lily Design System Nunjucks link picker: an icon button (a home icon) opening a disclosure of app-defined page links. Headless, SSR-safe, no CSS.

Readme

link-picker (Nunjucks)

A headless control for page links: a single-icon button (a bundled home SVG) that opens a dropdown of links your app defines — "Home", "About Us", "Contact Us", "Privacy Policy". No CSS, no routes, no English.

The single source of truth is spec/index.md; this file is the guide.

Quick start

{% from "lily-design-system-nunjucks-link-picker/dist/link-picker.njk" import linkPicker %}

{{ linkPicker({
  label: "Pages",
  links: [
    {label: "Home", href: "/", current: page.url == "/"},
    {label: "About Us", href: "/about/", current: page.url == "/about/"},
    {label: "Contact Us", href: "/contact/", current: page.url == "/contact/"},
    {label: "Privacy Policy", href: "/privacy/", current: page.url == "/privacy/"}
  ]
}) }}

<script type="module">
  import { autoInit } from "@lilydesignsystem/nunjucks-link-picker";
  autoInit();
</script>

label names the button, the list and the tooltip. There is no default list: the package ships no routes and no English.

Client-side navigation

import { autoInit } from "@lilydesignsystem/nunjucks-link-picker";

// A client-side router (e.g. htmx boost, Turbo, Navigo) takes over plain left clicks.
autoInit({ navigate: (href) => router.navigate(href) });

Ctrl/Cmd/Shift/Alt-click, middle-click and newTab links always stay native browser behaviour.

LinkItem

| Field | Notes | | --- | --- | | label | Visible text. Yours, so it localises. | | href | A route ("/about/") or a full URL. | | id | Reported when a link is chosen; defaults to the href. | | current | Marks the current page with aria-current="page". | | newTab | target="_blank" with rel="noopener noreferrer". |

Props

| label | string | yes | Accessible name of the button and the list; also the tooltip text. | | links | array | yes | { label, href, id?, current?, newTab? }, already resolved (hrefs are strings). | | name / id | string | no | Id discriminator / explicit id prefix (default link-picker-link). | | classes / attributes | | no | Extra root classes / attributes. | | {% call %} body | | no | Replaces the icon, not the links. | | client navigate, onNavigate | functions | no | Passed to initLinkPicker(root, opts) / autoInit(opts): a macro cannot carry a function. |

Styling

Headless: no CSS ships. Hooks: .link-picker, .link-picker-button, .link-picker-icon, .link-picker-tooltip, .link-picker-list (carries hidden when closed), .link-picker-list-item, .link-picker-link. The monorepo's 45 themes/ style them all, including the popup placement.

Examples

examples/: the four-link example, router integration and a custom icon.