$ git show spring-bounce

Spring bounce

Intermediate/anim spring-bounce

Drop a view in with a bouncy spring. Tune damping for more or less bounce.

Main · New Architecture only · worklets live in react-native-worklets

This snippet uses APIs that didn’t change between versions, so the same code runs on Reanimated 4 and 3.

withSpringdampingstiffness
spring-bounce.tsx · reanimated 4
const y = useSharedValue(-60);
useEffect(() => {
  y.value = withSpring(0, { damping: 8, stiffness: 120, mass: 0.8 });
}, []);
const style = useAnimatedStyle(() => ({ transform: [{ translateY: y.value }] }));