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

@dbb-dev/simple-animation

v0.1.4

Published

Anime HTML interface implementation.

Downloads

17

Readme

simple-animation

Simple Animation (sa) is a HTML interface implementation for Anime.js.

Scroll animation

Trigger animation when the element is entering the viewport. Each element can contain three different animation strategies how to interact with anime.js

Viewport vs element

Each element will has its own perspective of the client viewport matrix. Hereby you can determine for each animation element the viewport size and how the animation interacts with it's "own" viewport.

Image viewport vs element

Viewport strategy

<element data-sa="an animation"></element>

The animation will be played when the element enters the viewport. When the element exit the viewport the animation will be played reverse.

Scroll strategy

<element data-sa-scroll="an animation"></element>

When scrolling into the viewport the element position within the viewport determine the position of the animation. When scrolling out the viewport the animation will be played reverse based on the element position within the viewport.

Anchor strategy

<element data-sa-anchor="an animation"></element>

When scrolling down and the element bottom pass by the anchor element the animation will be played. By scrolling up and the element bottom passes by the anchor element the animation will be played reverse.

How to initialise scroll animation?

$(document).ready(function () {
    $("[data-sa],[data-sa-scroll],[data-sa-anchor]").simpleAnimation();
});

Scroll to animation

Smooth scroll to animation.

<a href="#elementId">An anchor link</a>

How to initialise scroll to animation?

$(document).ready(function () {
    $("a[href^='#']").scrollToAnimation();
});

How to add your own Anime.js settings?

SimpleAnimation.addAnimation("fadeIn", {
    opacity: [0, 1],
    easing: 'linear',
    duration: 1500
}).addAnimation("fadeOut", {
    opacity: [1, 0],
    easing: 'linear',
    duration: 1500
 });

Testing

Plugin is tested against JQuery version 3.2 and Anime.js 3.1.0

External dependency

External dependencies which should be added by the developer itself

  • Anime.js
  • JQuery