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

hoorayjs

v2.0.2

Published

lightweight confetti/burst effects with image support

Readme

hooray.js

lightweight confetti/burst effects with support for custom images and icons. no dependencies - based on the Web Animations API.

demo

install

npm install hoorayjs

or straight off a CDN if you're not using a bundler:

<script type="module">
  import { hooray } from "https://unpkg.com/hoorayjs";
</script>

ESM only. no CJS build.

usage

import { hooray } from "hoorayjs";

const btn = document.querySelector("#submit");

btn.addEventListener("click", () => {
  hooray(btn);
});

confetti bursts from the center of whatever element you pass in.

custom images

pass an image url and the pieces become that image instead of colored rectangles. works best with svg

hooray(btn, {
  image: "/icons/star.svg",
  width: 24,
  height: 24,
});

tinting

if you pass color along with image, the image gets a color overlay. color accepts any valid CSS color value:

hooray(btn, {
  image: "/icons/heart.svg",
  color: "hotpink",
  width: 24,
  height: 24,
});

options

| option | default | what it does | | -------------- | ------- | ---------------------------------------------------------------------------- | | count | 80 | number of pieces | | mobileCount | 40 | piece count on small screens (< 800px) | | duration | 3000 | animation length in ms | | width | 16 | piece width in px | | height | 8 | piece height in px | | mobileWidth | 16 | piece width on small screens | | mobileHeight | 8 | piece height on small screens | | randomSize | true | randomly scale each piece down from the max size (images keep aspect ratio) | | spread | 380 | burst radius in px | | mobileSpread | 120 | burst radius on small screens | | once | false | ignore repeat calls on the same element while a burst is already in flight | | image | — | url of an image to use for pieces | | color | — | with image, tints the image via css mask. without image, does nothing |

notes

  • respects prefers-reduced-motion — if the user has it set, nothing fires
  • safe to import in SSR / node, it just no-ops without a DOM
  • pieces are appended to document.body with the class hooray-piece if you want to style them
  • on mobile, the burst waits for the visual viewport to settle, so firing right after the keyboard closes doesn't put the origin in the wrong spot
  • everything cleans itself up after the animation finishes

license

MIT