Skip to content

ikerya/animate.js

Repository files navigation

Animate.JS

This package aims to replace Animate.CSS using JS step-by-step (requestAnimationFrame) animations instead of CSS ones (keyframes).

Usage

Demo

First option

// fadeOut

const start = new AnimateJS(
    document.getElementById('block'),
    {
        keyframes: [{
            opacity: [ 1 ]
        }, {
            duration: 1000,
            opacity: [ 1, 0 ]
        }]
    }
);

start().then(() => console.log("ended"));

Second option

// fadeOut

const options = {
    duration: 500
};
const start = AnimateJS.use(
    'fadeOut',
    document.getElementById('block'),
    options // optional
);

start().then(() => console.log("ended"));

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published