Socket
Socket
Sign inDemoInstall

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


Version published
Weekly downloads
3
increased by50%
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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc