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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ani-js

v1.5.9

Published

A lightweight JavaScript animation library that mimics Tailwind-style utility classes — no Tailwind installation needed.

Downloads

47

Readme

NPM Version NPM Downloads

Ani-Js

A lightweight JavaScript animation library that mimics Tailwind-style utility classes — no Tailwind installation needed. Injects minimal CSS for clean animations like fadeIn, slideUp, and more.

  • 📦 No Tailwind required
  • 💨 Utility-class style like .tw-fade-in
  • ⚡ Zero setup, just import and use
  • 🧩 Works with plain JavaScript, React, Vue, TypeScript, and more
  • 🎨 100+ prebuilt animations and effects

📚 Documentation & Playground

For full features, class names, playground, demos, and advanced usage, visit the official website: 👉 Ani-Js.com

⭐ If you find this package useful, please consider dropping a star on GitHub!


🚀 Installation

npm install ani-js

or

yarn add ani-js

🔧 Usage

📜 HTML / Vanilla JavaScript

✅ Class-based (CSS-only, simplest)

<!-- HTML -->
<!-- Link the CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ani-js@latest/ani-js.css">

<div class="tw-fade-in">Hello World</div>

✅ JavaScript Function-based (Dynamic)

<div id="box">Hello</div>
<button id="btn">Animate</button>

<script type="module">
  import { fadeIn } from 'ani-js';

  document.getElementById('btn').addEventListener('click', () => {
    const el = document.getElementById('box');
    fadeIn(el, 700);
  });
</script>

⚠️ Note: Direct ESM imports only work when served using a dev server (e.g. Vite, Webpack, Parcel), or from a CDN with module support. For quick demos or class-only usage, prefer the CDN CSS approach.


⚛️ React

Class-based (Best for global use)

Add to main.jsx or App.jsx:

import 'ani-js/ani-js.css';

Then use:

<div className="tw-slide-up">Hello</div>

JavaScript function-based (On event/effect)

import { slideUp } from 'ani-js';
import { useRef, useEffect } from 'react';

function MyComponent() {
  const ref = useRef();

  useEffect(() => {
    slideUp(ref.current, 600);
  }, []);

  return <div ref={ref}>Welcome!</div>;
}

Global CSS import (best for most cases)

In src/index.css or App.css:

@import 'ani-js/ani-js.css';

This way, you don’t have to import CSS in your JS/TS files.


💡 Summary of Use Cases

| Environment | Class-based (CSS) | Function-based (JS) | | ----------------- | --------------------- | ------------------------------------------ | | HTML | ✅ Yes (via CDN) | ✅ Yes (via import or CDN module) | | React | ✅ Yes (ani-js.css) | ✅ Yes (import { fadeIn } from 'ani-js') | | Vue, Svelte, etc. | ✅ Yes | ✅ Yes |


🤝 Contributing

🗽 Getting Started

  1. Fork the repository

  2. Clone your fork locally

    git clone https://github.com/Srinanth/Ani-Js.git
    cd ani-js
  3. Create a feature branch

    git checkout -b addition/new-animation
  4. Make changes – Add new animations, improve logic, or refactor existing code

  5. Commit your changes

    git commit -m "✨ Added New Animation"
  6. Push to your branch

    git push origin addition/new-animation
  7. Open a Pull Request on GitHub


📊 Development Guidelines

  • Code Style: Follow existing patterns used in JavaScript, CSS, and React files

  • Animations: Use consistent utility class naming (tw-fade-in, tw-bounce, etc.)

  • Testing:

    • Manually test animations using the local playground
  • CSS: Keep styles minimal and optimized

  • Performance: Prefer CSS animations unless JavaScript is necessary


🧪 Local Dev Tips

  • Use Vite for a fast local development environment
  • Use the local playground HTML/React page to test all animations live
  • Keep animations scoped and reusable