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

flowgeneration

v0.2.0

Published

Zero-bloat, attribute-driven animation library. CSS-first with optional GSAP power.

Downloads

407

Readme

FlowG

Zero-bloat, attribute-driven animation library. One import — CSS animations load instantly, GSAP loads on demand.

npm version gzip size license


Features

  • 🪶 Smart Loading — CSS animations ~3KB gzipped. GSAP loads only when needed.
  • 🎬 GSAP Included — Text stagger, scroll scrub, physics bounce — no separate install.
  • 📐 Attribute-driven — No JavaScript needed. Just data-flowg-* attributes.
  • 🎯 Plugin-aware — ScrollTrigger and other GSAP plugins load only when an animation uses them.
  • 🎛️ Configurable — Duration, delay, easing, trigger via data attributes.

Installation

npm install flowgeneration
# or
pnpm add flowgeneration
# or
yarn add flowgeneration

GSAP is bundled — no separate install needed.

Quick Start

Just import — it auto-initializes. No setup function needed.

import "flowgeneration";
import "flowgeneration/style.css";
<!-- CSS animation — loads instantly -->
<div data-flowg-anim="fade-up" data-flowg-duration="0.6">Hello World</div>

<!-- GSAP animation — GSAP loaded on demand -->
<div data-flowg-anim="text-stagger" data-flowg-duration="0.8">
  Staggered text reveal
</div>

Via CDN (Script Tag)

No init call required — the script auto-detects data-flowg-* elements.

<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/flowgeneration@latest/dist/style.css" />
<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/flowgeneration@latest/dist/flowg.js"></script>

<div data-flowg-anim="fade-up">Content</div>

Dynamic Elements

FlowG automatically watches for new elements added to the DOM (via MutationObserver). Elements added after page load — from SPA navigation, lazy loading, or JavaScript — are animated automatically.

How Smart Loading Works

FlowG scans the page for data-flowg-anim attributes:

  1. CSS animations (fade-up, blur-in, etc.) — handled with pure CSS transitions + IntersectionObserver. Zero GSAP cost.
  2. GSAP animations (split-text, scroll-scrub, etc.) — GSAP core is dynamically imported only if a GSAP animation is found.
  3. GSAP plugins (e.g. ScrollTrigger) — loaded only when a specific animation needs them (e.g. scroll-scrub).

If your page only uses CSS animations, no GSAP code is loaded at all.

API — data-flowg-* Attributes

| Attribute | Values | Description | | :-------------------- | :-------------------------------------- | :--------------------------- | | data-flowg-anim | fade-up, blur-in, text-stagger, … | Required. Animation name | | data-flowg-duration | 0.5, 1s | Animation duration | | data-flowg-delay | 0.2 | Delay before start | | data-flowg-ease | ease-out, power2.out | CSS or GSAP easing | | data-flowg-offset | 20% | Viewport trigger offset | | data-flowg-trigger | viewport, hover, click | What starts the animation |

CSS Animations

These use the lightweight CSS layer — no GSAP loaded:

fade-up · fade-down · fade-left · fade-right · fade-in · zoom-in · zoom-out · slide-up · slide-down · slide-left · slide-right · flip-up · flip-down · flip-left · flip-right · blur-in · blur-up · rotate-in · bounce-in

GSAP Animations

These trigger on-demand GSAP loading:

split-text · text-stagger · typewriter · scroll-scrub* · physics-bounce · stagger-up · stagger-fade · counter

* scroll-scrub also loads the ScrollTrigger plugin automatically

Programmatic API

import {
  activate,
  reset,
  CSS_ANIMATIONS,
  GSAP_ANIMATIONS,
  ANIMATION_REGISTRY,
} from "flowgeneration";

// Manually trigger an element
activate(document.querySelector("#my-el"));

// Reset to pre-animation state
reset(document.querySelector("#my-el"));

Webflow Integration

FlowG works with Webflow — no npm required. Add the scripts via Project Settings → Custom Code.

Step 1: Add Stylesheet (Head Code)

Paste this in Project Settings → Custom Code → Head Code:

<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/flowgeneration@latest/dist/style.css" />

Step 2: Add Script (Footer Code)

Paste this in Project Settings → Custom Code → Footer Code:

<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/flowgeneration@latest/dist/flowg.js"></script>

That's it — one script handles everything. GSAP loads automatically if needed.

Step 3: Add Attributes to Elements

In the Webflow Designer:

  1. Select any element
  2. Go to Element Settings (⚙️ icon)
  3. Under Custom Attributes, add:

| Name | Value | | --------------------- | --------------------------------- | | data-flowg-anim | fade-up (or any animation name) | | data-flowg-duration | 0.6 (optional) | | data-flowg-delay | 0.2 (optional) | | data-flowg-ease | ease-out (optional) |

Webflow Tips

  • One-time setup: Steps 1 & 2 only need to be done once per project
  • Per-element: Step 3 is done on each element you want to animate
  • Preview: Use Webflow's preview mode or publish to see animations
  • CMS items: Attributes work on CMS-powered elements too

TypeScript

Full type declarations are included. All exports are fully typed.

Browser Support

Works in all browsers supporting IntersectionObserver and dynamic import() (all modern browsers).

Development

# Build
pnpm build

# Dev (watch mode)
pnpm dev

License

MIT