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

pure-web

v1.1.39

Published

Web Modules for Pure Standards-based development

Downloads

1,764

Readme

pure-web - essential components for Modern Web Development

  npm i pure-web --save-dev

pure-web/spa

A routing Lit container (Light DOM) Base Class for modern Web Component-based SPA apps.

More info

pure-web/ac

An AutoComplete box, reinvented for the Modern Web.

A versatile, accessible autocompletion Web Component that works everywhere and has zero dependencies.

More info

pure-web/common

Common utility methods for daily use.

pure-web/svg-icon

A web component for SVG sprite display.

<svg-icon icon="menu"></svg-icon>

pwa-boost

pwa-boost desktop banner example

A tiny, framework‑agnostic web component that helps users install or open your PWA with an Airbnb‑style bottom banner, plus a fly‑out for QR or install instructions.

It handles Android install prompt, iOS Add to Home Screen help, in‑app browsers (IG/TikTok) with a best‑effort escape ladder, and desktop QR.

Multilingual support. Fully customizable.

More info

AutoDefiner

Imagine your web components work like any other (built-in) html element, by just using the tag in your HTML 🤯...

AutoDefiner automatically notices web components when they're becoming part of the DOM, loading their defining code automatically at runtime.

You can have a really smart bundle splitter, but AutoDefiner will always be smarter.

It effectively handles 'load code on demand' scenarios in by far the best way possible: when it's being used - using only the native DOM and its APIs 🤯.


  import { AutoDefiner } from "pure-web/auto-definer";

  async yourAsyncInit() {
    // Start watching the whole document. Components are in /auto-define/<tag>.js
    this.auto = new AutoDefiner({
      baseURL: "/auto-define/",
      // If you have odd filenames:
      // mapper: (tag) => `wc-${tag}.js`,
      // The mapper may also return a full URL (or a URL object),
      // which lets you load from other folders or a CDN:
      // mapper: (tag) => `https://cdn.example.com/components/${tag}.js`,
      // or
      // mapper: (tag) => new URL(`/components/${tag}.js`, location.href),
      // Only auto-define for your own namespace:
      // predicate: (tag) => tag.startsWith("myprefix-"),
    });
  }

If you need to initialize some component before it's auto-discovered in the html:

AutoDefiner.define(["tag-name", ...])

ActionRoute

A tiny path-based action router for MPAs and same-document UI flows.

import { ActionRoute, ActionRouteController } from "pure-web/action-router";
  1. Register on startup: ActionRoute.create("/open-drawer", { to, from })
  2. Or use lazy logic loading: ActionRoute.create("/browse", new ActionRouteController("/assets/routes/browse-controller.js", { apiClient }))
  3. Trigger later: ActionRoute.run("/open-drawer")

Back/Forward restore automatically; reload restores if you're already on that path.

ActionRoute.create("/journal", {
  to: () => app.drawer.show(html`<journal-ui></journal-ui>`),
  from: () => app.drawer.close(),
  in: ({ exact, segments }) => {
    // called when sub-routes within /journal/ are navigated to
  }
});

More info