Animation skill · Mobile

React Native motion

Reanimated, Gesture Handler and Skia at 60-120fps.

Give this skill to your AI agent

Run this in your project. Claude Code picks it up from .claude/skills; for other agents, paste the file into their rules.

mkdir -p .claude/skills/react-native-motion && curl -fsSL https://kitesmotion.com/skills/react-native-motion/SKILL.md -o .claude/skills/react-native-motion/SKILL.md
Download SKILL.md

Run animations on the UI thread with Reanimated so they stay smooth even when JavaScript is busy.

Setup

  • react-native-reanimated (v3+), react-native-gesture-handler, optional @shopify/react-native-skia for drawing.
  • Keep animated values in useSharedValue and styles in useAnimatedStyle.

Basics

tsxconst scale = useSharedValue(1);
const style = useAnimatedStyle(() => ({ transform: [{ scale: scale.value }] }));
// press
scale.value = withSpring(0.96, { damping: 18, stiffness: 400 });
  • withTiming(value, { duration: 220, easing: Easing.bezier(0.16, 1, 0.3, 1) }) for fades and slides.
  • withSpring for anything touched or interrupted.
  • withDecay({ velocity }) after flings.

Gestures

tsxconst pan = Gesture.Pan()
  .onChange((e) => { x.value += e.changeX; })
  .onEnd((e) => { x.value = withSpring(snap(x.value, e.velocityX)); });

Layout animations

Use entering={FadeInDown.springify()}, exiting={FadeOut} and layout={LinearTransition} for lists.

Shared element style transitions

Measure the source with measure() and animate an overlay from that frame to the target frame, then swap.

Skia

Use Skia for blurs, gradients, particles and gooey effects (Blur plus ColorMatrix alpha threshold).

Rules

  • Never read shared values in render; never call JavaScript functions in worklets without runOnJS.
  • Use useReducedMotion() and provide fades.
  • Add haptics with expo-haptics at snaps and confirmations.

More skills