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

@fluid-ds/animations

v0.0.3-alpha.0

Published

Attribute-driven animation system for Fluid. A registry of named keyframes plus a global controller that watches data-fluid-animation attributes on any element.

Readme

@fluid-ds/animations

Attribute-driven animation system for Fluid. A registry of named keyframes plus a global controller that watches data-fluid-animation attributes on any element and runs the animation through the Web Animations API.

Framework-agnostic, works on fluid-* components, plain HTML, and elements rendered by any framework.

Quick start

CDN

<script type="module" src="https://cdn.jsdelivr.net/npm/@fluid-ds/animations@latest/dist/define/controller.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@fluid-ds/animations@latest/dist/register-defaults.js"></script>

<fluid-card
  data-fluid-animation="fade-in"
  data-fluid-animation-trigger="in-view">
  Fades in when scrolled into view.
</fluid-card>

npm

pnpm add @fluid-ds/animations
import "@fluid-ds/animations/define/controller"; // boot the controller
import "@fluid-ds/animations/register-defaults"; // ~12 common animations

To stay tree-shaken, register only what you use:

import "@fluid-ds/animations/define/controller";
import "@fluid-ds/animations/animations/fade-in";
import "@fluid-ds/animations/animations/slide-up";

Attributes

| Attribute | Purpose | Default | | ------------------------------------ | ---------------------------------------------------- | ------------ | | data-fluid-animation | Animation name from the registry | required | | data-fluid-animation-trigger | mount / in-view / hover / click / manual | mount | | data-fluid-animation-duration | Milliseconds | per-anim | | data-fluid-animation-delay | Milliseconds | 0 | | data-fluid-animation-easing | Any CSS easing function | per-anim | | data-fluid-animation-iterations | Integer or infinite | per-anim |

Included defaults

fade-in, fade-out, slide-up, slide-down, slide-left, slide-right, scale-in, zoom-in, pulse, shake, bounce, flash, spin.

Custom animations

import { registerAnimation } from "@fluid-ds/animations";

registerAnimation("blur-in", {
  keyframes: [
    { opacity: 0, filter: "blur(8px)" },
    { opacity: 1, filter: "blur(0)" }
  ],
  defaults: { duration: 600, easing: "ease-out", fill: "forwards" }
});

After registration data-fluid-animation="blur-in" just works.

Effects: imperative celebrations

Alongside the attribute-driven keyframe registry, the pack ships an imperative effects subsystem for "event" celebrations (confetti, fireworks, snow, and friends). It is a tiny self-contained canvas particle engine with zero third-party dependencies: one pooled full-viewport <canvas> (fixed, click-through, top layer, decorative) shared by every active burst and driven by a single requestAnimationFrame loop. The canvas is removed automatically when no effect is running.

import { confetti, fireworks } from "@fluid-ds/animations/effects";

// Fire from the clicked button
buyButton.addEventListener("click", () => confetti({ origin: buyButton }));

// Two-sided cannons
confetti({ cannons: true, count: 160 });

// Fireworks return a handle with a finished promise
const show = fireworks({ shells: 8 });
await show.finished;

Every effect returns { stop(): void; finished: Promise<void> }.

Effect functions

confetti, fireworks, emojiBurst, emojiRain, snow, sparkles, streamers, pulse, stars, hearts, pride.

emojiBurst / emojiRain accept a custom emojis array OR images (an array of loaded HTMLImageElement / rasterized SVG) to use as particles. snow, sparkles, and emojiRain are ambient: they run until you call stop() (or pass a duration).

Colors default to the live Fluid brand accent plus the semantic status tones (read from CSS custom properties on the document) and are fully overridable via an colors array.

<fluid-celebrate>

A declarative wrapper that renders nothing visible and draws on the shared canvas:

import "@fluid-ds/animations/define/celebrate";
<fluid-celebrate effect="confetti" auto></fluid-celebrate>

<fluid-celebrate id="party" effect="fireworks"></fluid-celebrate>
<script type="module">
  document.getElementById("party").fire();
</script>

It exposes fire() / stop() and emits fluid-celebrate-end when a burst finishes. See the effects docs for the full option reference.

Accessibility

The controller respects prefers-reduced-motion: reduce, every animation collapses to a 0ms tick that lands on the final frame. Users who opt out of motion get the static end state. The effects engine is equally reduced-motion aware: under reduce nothing animates and ambient effects resolve immediately. Its canvas is aria-hidden, click-through, and never focusable.

License

MIT