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

animate0.js

v1.0.2

Published

High-performance web animation engine (ESM-first) with UMD/IIFE/CJS outputs, JSDoc types, tests, and examples

Downloads

29

Readme

animate0.js

High‑performance web animation engine (ESM‑first) with UMD/IIFE/CJS outputs and rich TypeScript typings generated from JSDoc. It mirrors the ergonomics of anime‑style APIs while focusing on performance, predictable timing, and developer experience.

• Tiny core with adaptive ticking, batched transforms, and low‑GC loops
• Friendly API: animate, timeline, stagger, waapi wrapper, draggable, scroll, SVG, text splitting
• Works in modern browsers and Node (limited tests)

Installation

npm i animate0.js
# or
pnpm add animate0.js

CDN/IIFE (global animate0):

<script src="./lib/animate0.iife.min.js"></script>

Usage (ESM)

<div class="box"></div>
<script type="module">
  import { animate, eases } from 'animate0.js';
  const box = document.querySelector('.box');
  animate({ targets: box, duration: 800, props: { opacity: [0, 1], translateX: [0, 200] }, ease: eases.easeInOutQuad });
</script>

Timeline

import { createTimeline, animate } from 'animate0.js';
const el = document.querySelector('.box');
const a1 = animate({ targets: el, duration: 300, props: { opacity: [0, 1] } });
const a2 = animate({ targets: el, duration: 300, props: { translateX: [0, 150] } });
createTimeline().add(a1, 0).add(a2, 320).play();

Stagger

import { animate, stagger } from 'animate0.js';
const items = document.querySelectorAll('.item');
items.forEach((el, i) => animate({ targets: el, delay: i*40, duration: 400, props: { translateY: [16, 0], opacity: [0, 1] } }));

Draggable

import { createDraggable } from 'animate0.js';
createDraggable(document.querySelector('#drag'));

WAAPI

import { waapi } from 'animate0.js';
waapi(document.querySelector('#el'),
  [ { transform: 'scale(1)' }, { transform: 'scale(1.04)' }, { transform: 'scale(1)' } ],
  { duration: 1200, iterations: Infinity, easing: 'ease-in-out' }
);

API Reference

All exports come from src/animate0.js:

  • animate(params)JSAnimation
  • createTimeline()Timeline
  • stagger(opts) → function(i,total) → delay
  • eases → common easing functions
  • engine → control timeUnit('ms'|'s') and precision
  • createTimer, Timer
  • createDraggable, Draggable
  • onScroll, ScrollObserver, scrollContainers
  • waapi, WAAPIAnimation
  • svgdraw() helpers
  • textTextSplitter
  • utils → basic DOM helpers like $()

See inline JSDoc for parameter details. The public API is stable for the 1.0 line.

Development

npm i
npm run dev           # watch bundle
npm run open-examples # serve examples with live reload
npm run test-browser  # run browser tests (Mocha + Chai)
npm run test-node     # run node tests
npm run build         # build all formats and generate types

Outputs:

  • ESM: lib/animate0.esm.js, lib/animate0.esm.min.js
  • UMD: lib/animate0.umd.js, lib/animate0.umd.min.js
  • IIFE: lib/animate0.iife.js, lib/animate0.iife.min.js
  • CJS: lib/animate0.cjs, lib/animate0.min.cjs
  • Types: types/*.d.ts with types/index.d.ts

Contributing

PRs welcome. Please:

  • Keep changes focused, with tests and docs
  • Use JSDoc types and follow the control‑flow rules in CONTRIBUTING.md
  • Ensure npm run build and both test suites are green before submitting

Versioning and Releases

  • Run npm run release to produce production bundles
  • Tag a release on GitHub and (optionally) automate publish via GitHub Actions

License

MIT © animate0 contributors