framer-motion, react-motion, react-native-animatable, react-native-reanimated, react-spring, and react-transition-group are JavaScript libraries that enable declarative animations in React and React Native applications. These tools help developers create smooth transitions, gestures, and interactive UI elements while abstracting low-level animation APIs. Some focus on web-only use (react-transition-group, react-motion), others specialize in React Native (react-native-animatable, react-native-reanimated), and a few like framer-motion and react-spring support both platforms with varying degrees of fidelity and performance characteristics.
Choosing the right animation library in the React ecosystem depends heavily on your platform (web vs. React Native), performance requirements, and desired level of abstraction. Let’s compare six major options — including one that’s past its prime — through real engineering lenses.
Before diving into features, note that react-motion is effectively deprecated. Its GitHub repo hasn’t seen meaningful updates since 2018, and the maintainers recommend migrating to alternatives like react-spring. Do not start new projects with react-motion.
The rest — framer-motion, react-spring, react-transition-group, react-native-reanimated, and react-native-animatable — are actively maintained as of 2024.
framer-motion: High-Level DeclarativeFramer Motion treats animation as a prop. You describe what should animate, not how.
// Web or React Native
import { motion } from 'framer-motion';
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.5 }}
/>
react-spring: Physics-Based DeclarativeReact Spring uses spring physics as its core model, giving natural-feeling motion.
import { useSpring, animated } from 'react-spring';
const props = useSpring({ opacity: 1, from: { opacity: 0 } });
return <animated.div style={props} />;
react-transition-group: Lifecycle Hooks OnlyThis library doesn’t animate anything itself — it just tells you when to animate.
import { CSSTransition } from 'react-transition-group';
<CSSTransition in={show} timeout={300} classNames="fade">
<div>Hello</div>
</CSSTransition>
/* CSS */
.fade-enter { opacity: 0; }
.fade-enter-active { opacity: 1; transition: opacity 300ms; }
react-native-reanimated: Native-Thread DeclarativeReanimated v2+ uses worklets — functions that run on the UI thread — for true 60fps.
import Animated, { useSharedValue, useAnimatedStyle, withTiming } from 'react-native-reanimated';
const opacity = useSharedValue(0);
opacity.value = withTiming(1, { duration: 500 });
const style = useAnimatedStyle(() => ({ opacity: opacity.value }));
return <Animated.View style={style} />;
react-native-animatable: Simple Preset AnimationsProvides ready-made animations via component props.
import Animatable from 'react-native-animatable';
<Animatable.View animation="fadeIn" duration={500}>
<Text>Hello</Text>
</Animatable.View>
| Package | Web | React Native |
|---|---|---|
framer-motion | ✅ | ✅ (limited) |
react-spring | ✅ | ✅ |
react-transition-group | ✅ | ❌ |
react-native-reanimated | ❌ | ✅ |
react-native-animatable | ❌ | ✅ |
react-motion | ✅ | ❌ (deprecated) |
Note:
framer-motion’s React Native support lacks advanced features like layout animations and gesture handlers available on web.
This is critical on mobile:
react-native-animatable, older Animated API): Can jank if JS is busy.react-native-reanimated): Run independently of JS, ensuring smoothness.Compare these two React Native approaches:
// react-native-animatable (JS thread)
<Animatable.View animation="slideInUp" />
// react-native-reanimated (native thread)
const translateY = useSharedValue(100);
translateY.value = withSpring(0);
const style = useAnimatedStyle(() => ({ transform: [{ translateY: translateY.value }] }));
<Animated.View style={style} />
For complex interactions (e.g., dragging a card), only reanimated guarantees consistent 60fps.
All libraries handle this differently:
react-transition-group (Web)Uses lifecycle states (entering, entered, etc.) to toggle CSS classes.
<TransitionGroup>
{items.map(item => (
<CSSTransition key={item.id} timeout={500} classNames="item">
<div>{item.name}</div>
</CSSTransition>
))}
</TransitionGroup>
framer-motion (Web & RN)Automatic presence detection with AnimatePresence.
import { AnimatePresence, motion } from 'framer-motion';
<AnimatePresence>
{isVisible && (
<motion.div
initial={{ y: -100 }}
animate={{ y: 0 }}
exit={{ y: -100 }}
/>
)}
</AnimatePresence>
react-spring (Web & RN)Uses useTransition hook for list/item transitions.
const transitions = useTransition(items, {
from: { opacity: 0 },
enter: { opacity: 1 },
leave: { opacity: 0 }
});
return transitions((style, item) => <animated.div style={style}>{item}</animated.div>);
react-native-reanimatedRequires manual coordination with LayoutAnimation or custom logic — no built-in presence system.
// No direct equivalent; often combined with useState + timing functions
For drag, pan, or tap interactions:
framer-motion: Built-in drag prop and whileHover/whileTap.<motion.div drag dragConstraints={{ left: 0, right: 0 }} />
react-spring: Works with @react-spring/web or @react-spring/native + gesture libraries like react-use-gesture.const [{ x, y }, api] = useSpring(() => ({ x: 0, y: 0 }));
const bind = useDrag(({ offset: [x, y] }) => api.start({ x, y }));
return <animated.div {...bind()} style={{ x, y }} />;
react-native-reanimated: Deep integration with react-native-gesture-handler.const gesture = Gesture.Pan().onUpdate(e => {
translateX.value = e.translationX;
});
return <GestureHandlerRootView>
<GestureDetector gesture={gesture}>
<Animated.View style={animatedStyle} />
</GestureDetector>
</GestureHandlerRootView>;
react-transition-group (just lifecycle hooks), react-native-animatable (preset animations).framer-motion (rich feature set but larger bundle), react-spring (flexible but requires understanding springs).react-native-reanimated (steep learning curve due to worklets and threading model).→ Use framer-motion for scroll-triggered animations, hover effects, and page transitions. Pair with AnimatePresence for route changes.
→ react-spring excels at interpolating values and animating SVG paths based on data changes.
→ For anything beyond basic fades: react-native-reanimated + react-native-gesture-handler. Accept the learning curve for buttery-smooth UX.
→ react-transition-group + CSS transitions. Zero runtime overhead.
react-motion?→ Plan migration to react-spring or framer-motion. Do not extend its usage.
There’s no universal “best” animation library. Match the tool to your constraints:
framer-motionreact-springreact-native-reanimatedreact-transition-groupreact-native-animatable (with caution)react-motion? → Migrate awayChoose wisely — the right animation library makes interactions feel alive without sacrificing performance or maintainability.
Choose react-transition-group when you need minimal, reliable enter/exit animations tied to component mounting/unmounting (e.g., modals, lists, route transitions). It doesn’t handle animation logic itself but provides lifecycle hooks to drive CSS or imperative animations. Best paired with CSS transitions or other animation libraries for actual motion implementation.
Choose framer-motion if you're building a modern React or React Native app and want a high-level, expressive API with excellent developer experience for common animations like gestures, layout transitions, and shared element transitions. It’s ideal when you prioritize rapid prototyping, visual polish, and don’t need fine-grained control over native animation threads. Avoid it if you require 60fps native-thread animations on mobile or must minimize bundle size in performance-critical contexts.
Choose react-native-reanimated when building demanding React Native UIs that require buttery-smooth 60fps animations, gesture-driven interactions, or shared values between JS and native threads. It’s the go-to for production-grade mobile experiences like custom navigators, pull-to-refresh, or drag-and-drop interfaces. Be prepared for a steeper learning curve and more verbose syntax compared to higher-level libraries.
Choose react-spring if you need a physics-based animation engine that works consistently across web and React Native, with strong support for interpolations, springs, and timeline orchestration. It offers more granular control than framer-motion while maintaining a declarative style. Ideal for data visualizations, complex state-driven transitions, or when you want to avoid platform-specific animation code.
Avoid react-motion in new projects — it is effectively deprecated and no longer actively maintained. While it pioneered spring-based physics in React, its API has been superseded by more modern alternatives like react-spring and framer-motion. If you encounter it in legacy code, plan a migration path rather than extending its usage.
Choose react-native-animatable for simple, pre-defined animations (like fades, bounces, or slides) in React Native apps where ease of use outweighs performance needs. It runs animations on the JavaScript thread, so it’s unsuitable for complex or high-frame-rate interactions. Use it only for basic entrance/exit effects in non-performance-sensitive screens.
ATTENTION! To address many issues that have come up over the years, the API in v2 and above is not backwards compatible with the original
React addon (v1-stable).For a drop-in replacement for
react-addons-transition-groupandreact-addons-css-transition-group, use the v1 release. Documentation and code for that release are available on thev1-stablebranch.We are no longer updating the v1 codebase, please upgrade to the latest version when possible
A set of components for managing component states (including mounting and unmounting) over time, specifically designed with animation in mind.
TypeScript definitions are published via DefinitelyTyped and can be installed via the following command:
npm install @types/react-transition-group
Clone the repo first:
git@github.com:reactjs/react-transition-group.git
Then run npm install (or yarn), and finally npm run storybook to start a storybook instance that you can navigate to in your browser to see the examples.