A bitmap icon has to ship at several densities and still blurs on a display you did not anticipate. react-native-svg renders real vector graphics - Path, Circle, LinearGradient and the rest - so one definition is sharp at any size, takes colour from props, and can be animated by Reanimated like any other view. For icon sets, a library like lucide-react-native wraps thousands of them over the same renderer.
Lottie solves a different problem: the complex animation a designer made in After Effects. Rebuilding one of those by hand is days of work and never quite matches. Lottie exports it as JSON describing the vectors and keyframes, and lottie-react-native plays it natively at full frame rate. Loading spinners, empty states, success ticks and onboarding illustrations are the usual uses.
Two cautions. A Lottie file can be large and complex enough to cost frames - check the file size and test on a low-end Android device, not only on a recent iPhone. And honour Reduce Motion: read it from AccessibilityInfo, and show a static frame instead of looping for readers who have asked the system for less movement.
import Svg, { Path, Circle, Defs, LinearGradient, Stop } from 'react-native-svg';
import LottieView from 'lottie-react-native';
import { AccessibilityInfo, View, Text } from 'react-native';
import { useEffect, useRef, useState } from 'react';
// One definition, sharp at any size, coloured from props.
export function TickIcon({ size = 48, color = '#0c7' }) {
return (
<Svg width={size} height={size} viewBox="0 0 24 24">
<Defs>
<LinearGradient id="fade" x1="0" y1="0" x2="1" y2="1">
<Stop offset="0" stopColor={color} stopOpacity="1" />
<Stop offset="1" stopColor={color} stopOpacity="0.5" />
</LinearGradient>
</Defs>
<Circle cx="12" cy="12" r="11" fill="url(#fade)" />
<Path d="M7 12.5 L10.5 16 L17 9" stroke="white" strokeWidth="2"
strokeLinecap="round" strokeLinejoin="round" fill="none" />
</Svg>
);
}
export function SuccessState() {
const animation = useRef<LottieView>(null);
const [reduceMotion, setReduceMotion] = useState(false);
useEffect(() => {
AccessibilityInfo.isReduceMotionEnabled().then(setReduceMotion);
const subscription = AccessibilityInfo.addEventListener(
'reduceMotionChanged', setReduceMotion,
);
return () => subscription.remove();
}, []);
return (
<View style={{ alignItems: 'center', gap: 12 }}>
<LottieView
ref={animation}
source={require('../assets/success.json')}
style={{ width: 180, height: 180 }}
// Reduce Motion: hold a single frame rather than looping.
autoPlay={!reduceMotion}
loop={false}
progress={reduceMotion ? 1 : undefined}
/>
<Text>Saved</Text>
</View>
);
}
Open this example in the editor and change it. Nothing you type is saved.