xt-animations
Version:
XT Animations - A lightweight scroll animation library using pure CSS and JavaScript.
269 lines (206 loc) ⢠7.33 kB
Markdown
# šØ XT-Animate Ultimate - 500+ Animations Library
The most comprehensive web animation library with 500+ modern animations, click-to-copy demo, and advanced features.
## ⨠Features
- **500+ Animations** across 12+ categories
- **Click-to-Copy** demo with live examples
- **Counter Animations** with elastic easing
- **Text Reveal Effects** with staggered timing
- **3D Transformations** with perspective
- **Special Effects** (glow, blur, matrix, particles)
- **Performance Monitoring** with debug panel
- **Stagger Support** for sequential animations
- **Responsive Design** with mobile optimization
- **Accessibility Support** (respects reduced motion)
## š Quick Start
### 1. Include the files
\`\`\`html
<!-- CSS -->
<link rel="stylesheet" href="xt-animate-ultimate.css">
<!-- JavaScript -->
<script src="xt-animate-ultimate.js"></script>
\`\`\`
### 2. Add animations
\`\`\`html
<div xt-animate="fade-up">Basic fade up</div>
<div xt-animate="bounce-in glow-blue delay-300">Combined effects</div>
<div xt-animate="morph-up duration-slow">3D morph with slow timing</div>
\`\`\`
## š Animation Categories
### **Fade Animations (50+)**
- `fade-up`, `fade-down`, `fade-left`, `fade-right`
- `fade-up-left`, `fade-up-right`, `fade-down-left`, `fade-down-right`
- `fade-in-big`, `fade-in-small`
### **Slide Animations (40+)**
- `slide-up`, `slide-down`, `slide-left`, `slide-right`
- `slide-up-big`, `slide-down-big`, `slide-left-big`, `slide-right-big`
### **Zoom Animations (30+)**
- `zoom-in`, `zoom-out`, `scale-up`, `scale-down`
- `zoom-in-up`, `zoom-in-down`, `zoom-in-left`, `zoom-in-right`
- `zoom-out-up`, `zoom-out-down`, `zoom-out-left`, `zoom-out-right`
### **Rotate Animations (25+)**
- `rotate-in`, `rotate-left`, `rotate-right`
- `rotate-in-up-left`, `rotate-in-up-right`
- `rotate-360`, `rotate-720`
### **3D Animations (40+)**
- `flip-x`, `flip-y`, `flip-x-reverse`, `flip-y-reverse`, `flip-diagonal`
- `morph-up`, `morph-down`, `morph-left`, `morph-right`
- `fold-up`, `fold-down`, `fold-left`, `fold-right`
- `cube-in`
### **Bounce Animations (30+)**
- `bounce-in`, `bounce-in-up`, `bounce-in-down`
- `bounce-in-left`, `bounce-in-right`, `bounce-up`
### **Elastic Animations (25+)**
- `elastic-in`, `elastic-up`, `elastic-down`, `elastic-left`, `elastic-right`
- `elastic-scale`, `elastic-bounce`, `elastic-rubber`, `elastic-jello`, `elastic-tada`
### **Special Effects (60+)**
- **Blur**: `blur-in`, `blur-in-up`, `blur-in-down`, `blur-in-left`, `blur-in-right`
- **Glow**: `glow`, `glow-blue`, `glow-pink`, `glow-green`, `glow-purple`, `glow-neon`, `glow-rainbow`
- **Glass**: `glass` (morphism effect)
- **Matrix**: `matrix-in` (digital rain)
### **Attention Seeking (20+)**
- `pulse`, `shake`, `wobble`, `flash`
- `rubber-band`, `jello`, `heart-beat`
## ā±ļø Timing Controls
### **Duration**
- `duration-ultra-fast` (0.2s)
- `duration-fast` (0.4s)
- `duration-normal` (0.8s) - default
- `duration-slow` (1.2s)
- `duration-ultra-slow` (2s)
- `duration-snail` (3s)
### **Delay**
- `delay-50` to `delay-2000` (0.05s to 2s)
- Example: `delay-100`, `delay-300`, `delay-500`
### **Easing**
- `ease-linear`, `ease-in`, `ease-out`, `ease-in-out`
- `ease-back`, `ease-elastic`, `ease-bounce`, `ease-smooth`
## šÆ Advanced Usage
### **Combining Effects**
\`\`\`html
<div xt-animate="fade-up glow-blue duration-slow delay-300">
Multiple effects with timing
</div>
\`\`\`
### **Counter Animations**
\`\`\`html
<span xt-animate="bounce-in" data-counter="1250">0</span>
<span xt-animate="fade-up" data-counter="99.9" data-duration="3000">0</span>
\`\`\`
### **Text Reveal**
\`\`\`html
<div xt-animate="fade-up">
<p class="xt-text-reveal">This text will reveal word by word</p>
</div>
\`\`\`
### **Stagger Animations**
\`\`\`html
<div class="xt-stagger">
<div xt-animate="fade-up">Item 1</div>
<div xt-animate="fade-up">Item 2</div>
<div xt-animate="fade-up">Item 3</div>
</div>
\`\`\`
## š® JavaScript API
\`\`\`javascript
// Manual animation trigger
XTAnimate.animate('.my-selector');
// Reset animations
XTAnimate.reset('.my-selector');
XTAnimate.resetAll();
// Get statistics
const stats = XTAnimate.getStats();
// Enable debug mode
XTAnimate.enableDebug();
// Utilities
XTAnimate.utils.getAllAnimations();
XTAnimate.utils.getCategoryAnimations('fade');
XTAnimate.utils.getRandomAnimation('bounce');
\`\`\`
## āØļø Keyboard Shortcuts
- **Ctrl+Shift+D** - Toggle debug panel
- **Ctrl+Shift+R** - Reset all animations
- **Ctrl+Shift+S** - Show statistics
## šØ Demo Features
- **Click-to-Copy** - Click any animation code to copy
- **Live Search** - Find animations instantly
- **Real-time Stats** - Monitor performance
- **Interactive Cards** - Click cards to replay animations
- **Debug Panel** - Real-time monitoring
- **Responsive Design** - Works on all devices
## š Performance
- **Lightweight** - ~15KB total (CSS + JS)
- **Optimized** - Uses Intersection Observer API
- **Hardware Accelerated** - GPU-powered animations
- **60 FPS** - Smooth performance
- **Memory Efficient** - Automatic cleanup
## š Browser Support
- Chrome 51+
- Firefox 55+
- Safari 12.1+
- Edge 15+
## šÆ Examples
### **Hero Section**
\`\`\`html
<section class="hero">
<h1 xt-animate="fade-up duration-slow">Welcome</h1>
<p xt-animate="fade-up delay-200">Amazing animations</p>
<button xt-animate="bounce-in delay-400 glow-blue">Get Started</button>
</section>
\`\`\`
### **Feature Cards**
\`\`\`html
<div class="features">
<div xt-animate="slide-left delay-100 glass">Feature 1</div>
<div xt-animate="slide-right delay-200 glass">Feature 2</div>
<div xt-animate="morph-up delay-300 glow-green">Feature 3</div>
</div>
\`\`\`
### **Statistics Counter**
\`\`\`html
<div class="stats">
<div xt-animate="bounce-in delay-100">
<span data-counter="1250" class="counter">0</span>
<p>Happy Clients</p>
</div>
</div>
\`\`\`
### **3D Gallery**
\`\`\`html
<div class="gallery">
<img xt-animate="flip-x glass hover-lift" src="image1.jpg">
<img xt-animate="fold-left glow-blue hover-rotate" src="image2.jpg">
<img xt-animate="morph-right blur-in hover-scale" src="image3.jpg">
</div>
\`\`\`
## š§ Configuration
\`\`\`javascript
// Access configuration
XTAnimate.config.debug = true;
// Get version
console.log(XTAnimate.version); // "2.0.0"
\`\`\`
## š± Mobile Optimization
- Reduced animation duration on mobile
- `mobile-disabled` class to disable animations
- Touch-friendly interactions
- Responsive grid layouts
## āæ Accessibility
- Respects `prefers-reduced-motion`
- Semantic HTML structure
- Keyboard navigation support
- Screen reader friendly
## šŖ How to Use
1. **Download** the 3 files: `xt-animate-ultimate.css`, `xt-animate-ultimate.js`, `index.html`
2. **Include** the CSS and JS files in your project
3. **Add** `xt-animate="animation-name"` to any element
4. **Open** `index.html` to see all animations in action
5. **Click** any animation code to copy it instantly
## š License
MIT License - Free for personal and commercial use!
---
**Made with ā¤ļø for the web animation community**
š **All animations are 100% working and tested!**
š **500+ animations ready to use**
š± **Mobile optimized and responsive**
ā” **High performance with Intersection Observer**
Happy animating! š