🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

js-anim

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-anim

Small JS plugin to animate elements in vieport

2.0.4
latest
Source
npm
Version published
Weekly downloads
1
-98.08%
Maintainers
1
Weekly downloads
 
Created
Source

js-anim

Example

  • Codesandbox

Install

npm i js-anim
<div class="box js-anim-el" data-anim-name="slideRight" data-anim-iterations="4" data-anim-delay="200" data-anim-duration="750" data-anim-ease="cubic-bezier(0.19, 1, 0.22, 1)">
    
</div>
import Anim from 'js-anim'

const els = document.querySelectorAll('.js-anim-el');

const anim = new Anim(els);
anim.observe();

Options

Standart options

{
  observer: {}, // intersectoinobserver options
  infinite: false, // infinite observing
}

Methods

anim.onEnter = (animator) => {
  // some callback
};
anim.onComplete = (animator) => {
  // some callback
};
anim.unobserve();

Keywords

anim

FAQs

Package last updated on 11 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts