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

@amonratcha/web-minimal-spinner

v0.0.2

Published

Tiny spinner for browser (Angular-ready ESM bundle)

Readme

# minimal-spinner

Tiny spinner for Node (CLI) and browser (DOM). This package provides a browser-ready ESM bundle so frontend frameworks (Angular, Vite, webpack) can import it directly.

## Install

npm:
```bash
npm install minimal-spinner

Build (for maintainers)

npm install
npm run build
  • npm run build runs tsc to emit types and Node build, and esbuild to create dist/browser.js (ES module).

Usage — Angular (example)

In your Angular component import the browser bundle entry (the package exports points import to dist/browser.js, so typically you can write import Spinner from 'minimal-spinner'):

// src/app/spinner-demo/spinner-demo.component.ts
import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
import Spinner from 'minimal-spinner'; // bundlers will resolve to dist/browser.js

@Component({
  selector: 'app-spinner-demo',
  template: `
    <div #host></div>
    <button (click)="start()">Start</button>
    <button (click)="succeed()">Succeed</button>
    <button (click)="fail()">Fail</button>
  `
})
export class SpinnerDemoComponent implements OnInit, OnDestroy {
  @ViewChild('host', { static: true }) host!: ElementRef<HTMLDivElement>;
  private spinner: any;

  ngOnInit(): void {
    // ensure this runs only in browser (if using SSR, guard with isPlatformBrowser)
    this.spinner = new Spinner({ container: this.host.nativeElement, text: 'Loading...', interval: 100 });
  }

  start() { this.spinner.start(); }
  succeed() { this.spinner.succeed('Done'); }
  fail() { this.spinner.fail('Failed'); }

  ngOnDestroy() { this.spinner?.stop(true); }
}

Notes:

  • If your Angular app uses SSR (Angular Universal), do not construct or start spinner on server — guard with isPlatformBrowser.
  • To test locally without publishing, use npm pack in the spinner project and npm install ../path/to/minimal-spinner-0.0.1.tgz in your Angular project, or use npm link.