LAE
A powerful yet Incredibly tiny engine that can deilver high quality animations with a very simple setup and minmal cost.
Delievers 3 Highly specilaized carefully curated Animations.
Control Everything you're animation can do, the whole set is available.
With a CLS of Zero, an INP of less then 100ms, and no DOM mutation and an overall size of 4.51 KB, this engine is technically a ghost.
Animation Types:
Class Declarative
This animation method delivers custom staggered text animation that is completely customizable with all of the attribute methods mentioned below
Class Declarative
This animation method delivers a custom compound fade animation that can be edited with all the given attributes below
Class Declarative
This animation method delivers a custom compound Image animation that can be edited with all the given attributes below
Control:
Attribute
This attribute specifices how long an animation will be delayed until trigger, timer starts once the element is on screen. works on animation types
Attribute
This attribute specifices how long an animation takes from start to finish. works on all animation types
Attribute
This attribute determines how the engine should split this text which there are three options (word , char , none) with word being the default meaning if this attribute wasnt declared the engine will result to the word split method, with none, not splitting the text at all. works only on text animatio method
Attribute
This attribute tells the engine to start animating the element from a specfic element
Attribute
this attribute tells the engine to set a custom cubic-bezier for this element
How to use:
Class Declarative
Class Declarative
Class Declarative
Attribute
Attribute
Attribute
Attribute
Attribute
Incremental Refresh System:
This system works automatically by triggering a new event listener with the name of 'LAE-refresh' and to animate you're newly added content you of course need to give them their animation method when injecting or adding the content
Notes:
Note
The animation auto handles text splitting meaning you could just write you're content in an h1 tag or in a span or any other type and the engine would handle it on its own, Keep in mind too, that its space senesitive so Do Not Add Any Extra Spaces
Note
for image class, It accepts delay, and ease.
Note
To properly animated image animations I'd prefer to put the image that would be animated in an overflow-hidden div
Note
Its advised to not use 'transform: translate()' on elements that are animated since that would override the engine and instead use translateX , translateY. using the CSS property (scale) would also obstruct the engine
Installation:
Link core.js to you're primary HTML file
Link styles.css to you're primary HTML file
Visit on:
Github
Visit LAE on github