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

vanilla-animation

v1.0.7

Published

a super light vanilla animation scroll down

Readme

vanilla-animation.js

License: MIT TypeScript Socket Badge jsdelivr npm npm downloads yarn

Demo - Features - Install - Usage - Options - Data API - Changelog - License

Inspired by: AOS and WOW

Vanilla Animation: super light lib for reveal CSS animation as you scroll down a page.

Demo

See the vanilla-animation.js demo.

Features

  • reveal CSS animation as you scroll down a page
  • by default, you can use it to trigger animate.css animations. But you can easily change the settings to your favorite animation library.
  • anywhere on the page and anywhere in the DOM
  • tested in Edge, Chrome, Firefox

Install

CDN via jsDelivr

<script src="https://cdn.jsdelivr.net/npm/vanilla-animation@latest/dist/vanilla-animation.min.js" type="text/javascript"></script>

Download vanilla-animation.js and include the script in your HTML file:

<script src="vanilla-animation.js" type="text/javascript"></script>

You can also install using the package managers NPM.

npm install vanilla-animation

modular code

import VanillaAnimation from 'vanilla-animation'

Usage

Add styles in <head>:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />

Add script right before closing </body> tag, and initialize it:

<script>
    new VanillaAnimation();
</script>

Set css animation on data-vanimation or directly on class attribute:

<div data-vanimation="animate__fadeIn">
    test1
</div>

For compatibility with wow, add vanimation on class attribute and you can use animate__ animation directly on classes:

<div class="vanimation animate__fadeIn">
    test2
</div>

And adjust behaviour by using data-vanimation-* attributes:

<div 
    data-vanimation="animate__fadeIn"
    data-vanimation-offset="200"
    data-vanimation-delay="50"
    data-vanimation-duration="1000"
    data-vanimation-iteration="5"
>
    test3
</div>

Options

The default options are:

{
    boxClass: '.vanimation, [data-vanimation]',
    animatePrefix: 'animate__',
    animateClass: 'animate__animated',
    offset: 0,
    mobile: true,
    live: true,
    scrollContainer: null,
    callback: null
}

Where:

  • boxClass is a string that containing the selector classes. This string must be a valid CSS selector string
  • animatePrefix is a string that indicated the prefix of animation if not using data-animation attribute.
  • animateClass is a string that indicated the end of animation.
  • offset is the offset in pixels from the bottom of the viewport when the animation should start
  • mobile is true or false to enable mobile detection
  • live is true or false to enable live detection
  • scrollContainer is an optional element to use instead of the window
  • callback is a callback function that is called when the animation is completed
      new VanillaAnimation({
          callback: function(el) {
              el.classList.add("vanimation-active");
          }
      });

Data API

  • data-vanimation="animate__fadeIn" is the animation class name
  • data-vanimation-offset="200" is the offset in pixels from the bottom of the viewport when the animation should start
  • data-vanimation-delay="0.5s" is animation delay time is seconds or milliseconds
  • data-vanimation-duration="500ms" is animation duration time is seconds or milliseconds
  • data-vanimation-iteration="5" is the animation iteration count
  • data-vanimation-reload="true" set to true to reload the animation on scroll

Known limitations

CSS transitions and animations on mobile device

Chrome on Android requires that you set "minimum-scale=1" in the "viewport" meta of your page. Not doing so causes the scrollY value to start increasing only after a good portion of the page is already scrolled

<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1">

Changelog

To see what's new or changed in the latest version, see the changelog

License

vanilla-animation.js is licensed under The MIT License (MIT) Copyright (c) 2025 Simone Miterangelis

This license is also supplied with the release and source code. As stated in the license, absolutely no warranty is provided.