vielhuber / lanimate

🥤 A small lib that animates dom els. 🥤

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🥤 lanimate 🥤

lanimate is a small library that animates appearing dom elements.

installation

use it as a module:

npm install lanimate
import Lanimate from 'lanimate';

or as a ready-to-go bundle:

<script src="lanimate.min.js"></script>

usage

const lanimate = new Lanimate();
lanimate.init();
<h2
    data-lanimate="fade|scrollX|scrollY|scale|rotate|rotate3d|skew"
    data-lanimate-speed="3000"
    data-lanimate-delay="1500"
    data-lanimate-split="none|char|word"
>
    Title
</h2>

if you want to prevent fouc, add this css:

[data-lanimate] {
    opacity: 0;
}

About

🥤 A small lib that animates dom els. 🥤

License:MIT License


Languages

Language:JavaScript 74.8%Language:HTML 25.2%