RE

React Native Reanimated

react-native-reanimated

More powerful alternative to Animated library for React Native.

React Native Libraries
react-native
react
native
reanimated
react-native-reanimated
React Native Libraries
javascript
npm
frontend
open source
Stars
11k
Weekly
7.3M
Open issues
329
Bundle
~15 kB

Installation

npm install react-native-reanimated

Code example

import Animated, { useSharedValue, useAnimatedStyle, withSpring } from "react-native-reanimated";
import { Pressable } from "react-native";

export function Example() {
  const scale = useSharedValue(1);
  const style = useAnimatedStyle(() => ({ transform: [{ scale: scale.value }] }));

  return (
    <Pressable onPress={() => { scale.value = withSpring(scale.value === 1 ? 1.2 : 1); }}>
      <Animated.View style={[{ width: 80, height: 80, backgroundColor: "tomato" }, style]} />
    </Pressable>
  );
}

Pros & cons

Pros

  • Actively maintained by Krzysztof Magiera
  • 7.3M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~15 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • 329 open issues on GitHub

FAQs

Alternatives & similar libraries