1.0.2 • Published 5 years ago

enim v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

enim npm

by enim you can animate html elements without write css or js and save a lot of time.

How to use

First, you can install enim on your project by npm:

npm i enim

or use css and js files directly from CDN:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/enim@1.0.2/dist/enim.min.css">
<script src="https://cdn.jsdelivr.net/npm/enim@1.0.2/dist/enim.min.js"></script>

Available attributes

attributevaluedescription
enim(animation name)Set an animation
enim-durationTime in millisecondsDuration of animation
enim-repeatint or 'infinite'Set a number to repeat the animation or set infinite
enim-onjavascript eventsAnimation starts after a JavaScript event such as 'click'
enim-soft-finishfalseanimation end without slowing down
enim-keep-endtrueThe element never returns to its original state

Available animations

Animation name for set to enim="" attribute
up-down
down-up
rotate-right
rotate-left
fade-in
fade-out
wink
shake

Examples

DIV rotation after clicking on it:

<div class="mydiv" enim="rotate-right" enim-on="click" enim-duration="900"></div>

Rotate the loading icon indefinitely and without interruption:

<div class="loading" enim="rotate-left" enim-repeat="infinite" enim-soft-finish="true"></div>

shaking the button after hovering the mouse over it:

<button enim="shake" enim-repeat="4" enim-on="mouseenter"></div>
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago