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

@tailwind-styled/animate

v5.0.1

Published

Native-backed async animation DSL for tailwind-styled-v4

Readme

@tailwind-styled/animate

Native-backed animation compiler for tailwind-styled-v4.

v5 Highlights

  • Async API (animate, keyframes, compileAnimation, compileKeyframes)
  • Native backend only (no JS fallback)
  • Optimized class validation (compileCss native when available, analyzer fallback)
  • Instance-based registry (createAnimationRegistry)
  • No automatic runtime style injection
  • Node.js >=20

Install

npm install @tailwind-styled/animate

Usage

import {
  animate,
  animations,
  extractAnimationCss,
  injectAnimationCss,
  keyframes,
} from "@tailwind-styled/animate"

const fadeIn = await animate({ from: "opacity-0", to: "opacity-100", duration: 200 })
const spin = await keyframes("spin", { "0%": "rotate-0", "100%": "rotate-180" })
const preset = await animations.slideUp()

// Build-time extraction
const css = extractAnimationCss()

// Optional runtime injection (manual, browser only)
injectAnimationCss()

// Non-browser safe mode
injectAnimationCss(undefined, { silent: true })

Registry API

import {
  animate,
  createAnimationRegistry,
  extractAnimationCss,
  resetAnimationRegistry,
} from "@tailwind-styled/animate"

const registry = createAnimationRegistry()
const cls = await animate({ from: "opacity-0", to: "opacity-100" }, registry)
const css = extractAnimationCss(registry)
resetAnimationRegistry(registry)

// Optional cache limit (LRU)
const boundedRegistry = createAnimationRegistry({ cacheLimit: 128 })

API Notes

  • animate(opts) and keyframes(name, stops) return only className.
  • compileAnimation(opts) and compileKeyframes(name, stops) return full compiled output:
    • className
    • keyframesCss
    • animationCss
  • Preset helpers (animations.*) use internal LRU caching and registry-aware reuse for repeated calls.
  • Registry cache is in-memory with bounded LRU behavior (default limit: 512 entries).
  • Use createAnimationRegistry({ cacheLimit }) to tune max retained entries.
  • resetAnimationRegistry() still clears all registry state immediately.

Environment Variables

| Variable | Description | | --- | --- | | TWS_ANIMATE_NATIVE_PATH | Explicit .node path for animate binding resolution. | | TWS_NATIVE_PATH | Shared fallback override path for native binding resolution. | | TWS_NO_NATIVE / TWS_NO_RUST | Disable native loading (unsupported in v5 animate, will throw). | | TWS_DEBUG / TAILWIND_STYLED_DEBUG | Set 1 to enable animate debug logs. | | DEBUG | Supports tailwind-styled:animate or tailwind-styled:*. |

Breaking Changes from v4

  1. animate() and keyframes() are now async and must be awaited.
  2. JS fallback has been removed; native backend is required.
  3. Automatic <style> injection has been removed from animate() and keyframes().
  4. Preset animations entries are async functions (await animations.fadeIn()).
  5. Global mutable registry APIs were replaced by explicit registry instances and helpers.

License

MIT