Agent skill Mobile
Expo Animation
Add React Native motion, gestures, transitions and haptics with Reanimated and Expo, including reduced-motion behavior.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add expo/skills --skill expo-animation --agent claude-code --yesCheck this file in your project.claude/skills/expo-animation/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add expo/skills --skill expo-animationSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Start in an Expo React Native project and check the installed SDK and gesture packages. A release build on a supported physical device is needed to verify gesture feel and haptics.
View operation manualWhat this skill helps with
- Choose appropriate animation properties, timing and springs.
- Connect gestures, transitions and haptic feedback.
- Address stuttering and provide reduced-motion behavior.
Good for
- Sheets, gestures and transitions
- Polishing mobile interaction feedback
- Publisher
- Expo, in collaboration with Emil Kowalski.
- Recipes
- Bundled RECIPES.md covers swipe actions, sheets, press feedback, and other native patterns.
- Motion stack
- Reanimated and Worklets for frame updates, Gesture Handler for gestures, and Expo Haptics for optional feedback.
- Verification
- Simulators can check flow. Verify feel and tactile feedback separately on a physical release build.
- Skill name
expo-animation- Repository
expo/skills
Plan what happens when the finger lets go
A swipe with no outcome
Make the row spring off the screen while I drag.
The drag needs rules for vertical scrolling, cancellation, committing a task, and an action someone can use without swiping.
A gesture with a checkable result
- Define horizontal intent, commit and cancel conditions.
- Keep frame updates on the UI runtime and submit once to the app’s existing action.
- Provide an accessible button and verify reduced motion and real-device behavior.
Expo Animation operation manual
Build a swipe that completes a task without taking over list scrolling, or turn an existing inline sheet into one that can follow a finger.
Extend an existing Expo list with a horizontal gesture and keep the normal completion action.
Find the list and its real completion action
Read the recipe, check the installed packages, and agree on what counts as a committed gesture.
Prompt · Step 1Use Expo’s expo-animation Skill and its bundled RECIPES.md swipe-to-delete recipe to plan a swipe-to-complete interaction for my existing task list. Locate the row, actual completion mutation, and current accessible Complete control. Check the Expo SDK and installed Reanimated, Worklets, and Gesture Handler versions. If needed, use npx expo install with only the packages required by the project. Confirm the root GestureHandlerRootView where Gesture Handler requires it. Tell me how vertical scrolling, cancellation, the swipe threshold or projected velocity, and reduced motion will work. Keep this pass to planning.npx expo install react-native-reanimated react-native-worklets react-native-gesture-handler expo-hapticsTrack the drag on the UI runtime
Use a shared translation value and send the completion action only after a successful gesture.
Prompt · Step 2Use expo-animation to implement the approved swipe. Follow the gesture API for the installed Gesture Handler version. Require horizontal intent and let vertical list scrolling proceed. Start from the row’s current position if a drag interrupts a spring. Use a shared x value and useAnimatedStyle for translateX, hand the release velocity to the snap-back spring, and use a single successful commit to call the existing completion action. In the Reanimated 4 / Worklets setup, use scheduleOnRN for that action from the worklet; keep it out of per-frame updates. Handle cancellation by settling without writing. If haptics are already supported, give one light cue on commit, and keep the completed state visibly clear. Keep the visible Complete action and skip decorative travel under reduced motion. Show the files and the app screen to test.Test intent, cancellation and repeated swipes
Use a test task to distinguish a valid completion from a short drag or a vertical scroll.
- Vertical scrolling and canceled swipes leave task state unchanged.
- A committed swipe updates the task only once.
- The visible Complete control works with reduced motion and assistive input.
Prompt · Step 3Use expo-animation to verify the task gesture in a release build on the slowest supported physical device available. Scroll vertically through the row, try a short drag and cancellation, commit a swipe, and check that the task becomes complete only once. Test interrupted snap-back, a repeated swipe, and a failed completion if available. With reduced motion enabled, complete a task through the accessible button and verify the final state. Report platform, device, build type, observed haptics, and which checks ran only in a simulator or source review.
Look up a native motion issue
Provide the Expo SDK, target platform, and whether the behavior occurs during the drag, upon release, or after navigation.
Swiping blocks normal list scrollingGesture
- Command or reference
RECIPES.md / Swipe to delete a row- Examples
- Declare horizontal intent and compare the existing vertical scroll and gesture handler versions.
A spring jumps when grabbed midwayInterruption
- Command or reference
Current shared value and release velocity- Examples
- Capture the displayed position at gesture start and pass release velocity to the settling spring.
React state or haptics is called every frameWorklets
- Command or reference
scheduleOnRN()- Examples
- Keep translation updates on the UI runtime and schedule one RN callback at a threshold or successful completion.
Expo Animation troubleshooting
Should a swipe-to-reveal action use a custom Pan?
The recipe recommends ReanimatedSwipeable for revealing regular action buttons. It uses a custom drag for swipe-to-commit behavior with velocity projection.
Why check the Expo SDK before installing packages?
npx expo install chooses versions compatible with the project’s SDK. Read the installed Gesture Handler version before using a recipe because the gesture APIs differ.
Can I validate the gesture in a simulator?
A simulator can exercise UI states and check the action. The Skill calls for a release build on a supported physical device to verify feel, frame performance, and tactile feedback.