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

@substrate-system/progress-indicator

v0.1.8

Published

Progress indicator implemented as a web component

Readme

progress indicator

tests types module semantic versioning install size gzip size license

See an article on piccalil.li/blog

Install

npm i -S @substrate-system/progress-indicator

Example

See ./example/index.html.

See the demonstration.

screenshot

screenshot 100%

This takes an attribute progress, which is a percent number from 0 - 100.

import { ProgressIndicator } from '@substrate-system/progress-indicator'
import '@substrate-system/progress-indicator/css'

ProgressIndicator.define()
<progress-indicator progress="10">
  <div role="alert" aria-live="polite">
    <!-- show this text iff the web component cannot render -->
    <p>Loading, please wait…</p>
  </div>
</progress-indicator>

Use

You've got options.

render server-side

This is factored as a "split component", which means it is easy to render server-side.

Import from the path /ssr. See ./example.

server

Import and build:

import { outerHTML } from '@substrate-system/progress-indicator/ssr'

// outerHTML takes the standard attributes

const myString = `
  <div id=root>
    ${outerHTML({ progress: 25 })}
  </div>
`

Client-side

If you pre-render the component server-side, then you can include a "light" version of the client-side JS, which just attaches event listeners and responds to attribute changes. It doesn't know how to render itself.

import { define } from '@substrate-system/progress-indicator/client'

define()

No build tools

It is possible to use this without building any JS. The package exposes a universal module, designed to be consumed directly.

After installing, copy the /umd.min.js path to your web server. It will define the component in the page registry, and any tags in the page will be hydrated.

copy

First copy the file to your server:

cp ./node_modules/@substrate-system/progress-indicator/dist/umd.min.js ./public/progress-indicator.js
<script src="/progress-indicator.js"></script>

HTML

And now you can use the tag in your markup:

<div id="root">
  <progress-indicator progress="0" stroke="8" viewbox="130">
    <!-- show  this text if we can't render web components -->
    <div role="alert" aria-live="polite">
      <p>Loading, please wait…</p>
    </div>
  </progress-indicator>
</div>

Bundle

If you are using a tool such as vite, just import, then use in your HTML.

Include the full version

import { ProgressIndicator } from '@substrate-system/progress-indicator'
import '@substrate-system/progress-indicator/css'

ProgressIndicator.define()

Include the light version

If you have already rendered server-side.

import { define } from '@substrate-system/progress-indicator/client'
import '@substrate-system/progress-indicator/css'

CSS

Include the CSS also.

No build tools

You can simply copy the CSS file to your server.

cp ./node_modules/@substrate-system/progress-indicator/dist/index.css ./public/progress-indicator.css

or the minified CSS:

cp ./node_modules/@substrate-system/progress-indicator/dist/index.min.css ./public/progress-indicator.css

link in HTML

<link rel="stylesheet" href="./progress-indicator.css">

Bundler

If you are using a tool such as vite, add a link to the css from within your javascript, at the /css path.

import '@substrate-system/progress-indicator/css'

develop

Start a localhost server of the ./example directory.

npm start

SSR

Use the /ssr path to render a static HTML file, and link to the "light" version of the client-side JS in HTML, then serve:

npm run example