📋 محتويات الصفحة
📖 الوصف
Lottie هي مكتبة من Airbnb لعرض animations المصممة في After Effects كملفات JSON. تُقدم طريقة لعرض animations معقدة بدون كود، مع الحفاظ على جودة عالية وحجم صغير. Lottie تُستخدم على نطاق واسع في التطبيقات لعرض loading animations, illustrations, وUI animations. متوفرة لـ Web, iOS, Android, وReact Nativ...
🎯 يستخدم في
مجالات استخدام هذه الأداة
Loading animations
UI animations
Micro-interactions
Marketing illustrations
After Effects animations export
✨ المميزات
أبرز مميزات هذه الأداة
Animations من After Effects مباشرة
Vector-based (حجم صغير)
تفاعلية (play
pause
speed)
متوفرة لكل المنصات
Performance محسّن
Customizable colors
BodyMovin plugin للتصدير
⚠️ العيوب
نقاط يجب مراعاتها
يحتاج After Effects أو LottieFiles
محدود بـ After Effects capabilities
حجم الملف قد يكون كبيراً
Less control من code-based animations
🔄 البدائل
أدوات بديلة يمكنك استخدامها
💻 مثال على الاستخدام
كيفية استخدام هذه الأداة
import lottie from 'lottie-web';
// Basic animation
const animation = lottie.loadAnimation({
container: document.getElementById('animation'),
path: 'data.json',
renderer: 'svg',
loop: true,
autoplay: true
});
// Control
animation.play();
animation.pause();
animation.stop();
animation.setSpeed(2);
animation.goToAndPlay(100, true); // 100 frames
// React
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
function Animation() {
return (
<DotLottieReact
src="https://lottie.host/animation.json"
loop
autoplay
style={{ width: 200, height: 200 }}
/>
);
}
// With controls
function ControlledAnimation() {
const animationRef = useRef();
return (
<>
<DotLottieReact
ref={animationRef}
src="animation.json"
autoplay={false}
/>
<button onClick={() => animationRef.current.play()}>
Play
</button>
</>
);
}
📚 أدوات أخرى في Animation
قد يعجبك أيضاً
Anime.js
⭐مكتبة رسوم متحركة JavaScript (JavaScript Animation Library)
AutoAnimate
مكتبة رسوميات تلقائية بدون إعداد مسبق
Framer Motion
⭐مكتبة رسوم متحركة لـ React (React Animation Library)
GSAP
⭐مكتبة رسوم متحركة قوية (Powerful Animation Library)
Lenis
⭐مكتبة Smooth Scroll (Smooth Scroll Library)
Motion One
مكتبة رسوميات خفيفة وعالية الأداء للويب