enami.js a simple animation- on-scroll library 5kb minified!
ABOUT enami.js provides an easy way to animate elements on visibility, it uses the Intersection Observer API to add attributes and css variables to elements visible on the screen.
🏀 Create your own CSS Animations 🎲 Staggering Effect 🎎 Parenting triggering 🎳 Delay setting 🪁 Duration setting 🌗 Offset setting HOW TO USE 1. Add enami.js script< script src = "https://unpkg.com/enami@0.8.0/dist/enami.min.js" > </ script >
📋 Copy to clipboard 2. Add enami.css style<link rel = "stylesheet" href = "https://unpkg.com/enami@0.8.0/dist/enami.min.css" >
📋 Copy to clipboard 3. Add data-enami attribute to your elements< h2 data-enami = "fade-up" > </ h2 >
📋 Copy to clipboard 4. Initialize the script< script > new enami(); </ script >
📋 Copy to clipboard
ENAMI PRE-BUILT ANIMATIONS (enami.css) Click on an animation to preview it ➡️
Fade In fade-in
Fade Up fade-up
Fade Left fade-left
Fade Right fade-right
Fade Down fade-down
Fade Out fade-in-out
Fade Up Out fade-up-out
Fade Left Out fade-left-out
Fade Right Out fade-right-out
Fade Down Out fade-down-out
Jump In jump-in
Jump Up jump-up
Jump Left jump-left
Jump Right jump-right
Jump Down jump-down
Jump Out jump-out
Jump Up Out jump-up-out
Jump Left Out jump-left-out
Jump Right Out jump-right-out
Jump Down Out jump-down-out
Scale In scale-in
Scale Up scale-up
Scale Left scale-left
Scale Right scale-right
Scale Down scale-down
Scale Out scale-out
Scale Up Out scale-up-out
Scale Left Out scale-left-out
Scale Right Out scale-right-out
Scale Down Out scale-down-out
DEMOS Staggering Use the data-enami-stagger along with the data-enami-children and data-enami-animation attributes to make a staggering effect on the children elements
METHODS AND EVENTS Demo 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Trigger Methods Init Destroy Destroy (initial state) Destroy (final state)