Installation and usage
Add animations to any element using the ot-animate attribute.
Install via npm
If you use a bundler or build step, install the package:
npm install oat-animate
Then import the CSS/JS from dist/ in your app entry, or
copy the built files into your own asset pipeline.
Use via CDN
For a quick drop‑in usage, include the compiled assets from the CDN:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ots-animate@latest/dist/oat-animate.min.css">
<script src="https://cdn.jsdelivr.net/npm/ots-animate@latest/dist/oat-animate.min.js"></script>
Animation Types
Available animations:
fade-up- Fades in while moving upwardfade-down- Fades in while moving downwardzoom-in- Scales up from smaller sizeslide-left- Slides in from rightslide-right- Slides in from leftpop- Quick bounce scale effectbounce- Bouncing movementflip-in- 3D flip effectpulse- Pulsing scale animation (loops)shake- Horizontal shake effect
On Load Animation
Animation plays when page loads:
<div ot-animate="fade-up">Content</div>
On Hover Animation
Animation plays on mouse hover:
<div ot-animate="hover:fade-up">Content</div>
In View Animation
Animation plays when element scrolls into viewport:
<div ot-animate="view:fade-up">Content</div>
Multiple Animations
Combine multiple animations on a single element:
<div ot-animate="fade-up hover:zoom-in">Content</div>