Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yurayarosh/js-anim
Small JS plugin to animate elements in vieport
https://github.com/yurayarosh/js-anim
Last synced: about 1 month ago
JSON representation
Small JS plugin to animate elements in vieport
- Host: GitHub
- URL: https://github.com/yurayarosh/js-anim
- Owner: yurayarosh
- Created: 2019-10-30T14:44:56.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T12:49:01.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T08:23:12.173Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# js-anim
### Example
* [Codesandbox](https://codesandbox.io/s/js-anim-example-nxk4e)
### Install
```html
npm i js-anim
``````html
``````js
import Anim from 'js-anim'const els = document.querySelectorAll('.js-anim-el');
const anim = new Anim(els);
anim.observe();
```### Options
Standart options
```js
{
observer: {}, // intersectoinobserver options
infinite: false, // infinite observing
}
```### Methods
```js
anim.onEnter = (animator) => {
// some callback
};
anim.onComplete = (animator) => {
// some callback
};
anim.unobserve();
```