Lottie is very light weight and easy to use with react native.
also Lottie is good quality and one of the advanced version of gif
Lottie component for React Native (iOS, Android, and Windows)
Lottie is an ecosystem of libraries for parsing Adobe After Effects animations exported as JSON with bodymovin and rendering them natively!
For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand.
Example
import React, { useEffect, useRef, Animated } from 'react';
import { Animated, Easing } from 'react-native';
import LottieView from 'lottie-react-native';
const AnimatedLottieView = Animated.createAnimatedComponent(LottieView);
export default function ControllingAnimationProgress() {
const animationProgress = useRef(new Animated.Value(0));
useEffect(() => {
Animated.timing(animationProgress.current, {
toValue: 1,
duration: 5000,
easing: Easing.linear,
useNativeDriver: false,
}).start();
}, []);
return (
<AnimatedLottieView
source={require('../path/to/animation.json')}
progress={animationProgress.current}
/>
);
}
You can find the full list of props and methods available in our API document. These are the most common ones:
Top comments (0)