[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A70KZG0DMBA1JEKG7D3B2A":3,"skill-same:01M7A70KZG0DMBA1JEKG7D3B2A":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7A70KZG0DMBA1JEKG7D3B2A","expo-animation",null,"Framework (OSS). Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use `animate`.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"MIT","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fexpo-animation\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fexpo-animation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"Framework (OSS). Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use `animate`.\"\nlicense: \"MIT\"\n---\n# Building Animations in Expo\n\nThis skill was created in collaboration with [Emil Kowalski](https:\u002F\u002Fgithub.com\u002Femilkowalski) and can also be found in the [emilkowalski\u002Fskills](https:\u002F\u002Fgithub.com\u002Femilkowalski\u002Fskills) repository, along with other useful animation skills.\n\nA construction skill for React Native. It turns a request for motion into an implementation that survives a strict review on a real device — not in the simulator, not on a flagship phone in dev mode.\n\nMobile changes three things about animation, and everything in this skill follows from them:\n\n1. **There is no hover.** Every affordance the web puts in hover has to live in press, position, or nothing.\n2. **There are two runtimes.** Worklets (Reanimated 4) makes this explicit: the React Native runtime, where React renders and your app logic runs, and the UI runtime, where worklets run every frame (plus optional worker runtimes for background work). An animation that touches the RN runtime stutters the moment the app does anything else. The whole craft is keeping motion on the UI runtime.\n3. **The user's finger is on the element.** Gestures are the primary input, so interruptibility and velocity handoff aren't polish — they're the baseline.\n\n## Operating Posture\n\nYou are a senior mobile engineer building the animation yourself. Make the call, state the reasoning in one line, write the code. Never present motion options as a menu.\n\nTwo failure modes, and the first is worse:\n\n1. **Animating something that shouldn't animate.** The gate below exists to produce zero lines of code sometimes.\n2. **Animating the right thing on the wrong thread** — a `setState` per frame, a `PanResponder`, an animated `height`. It looks fine in dev on your phone and drops to 20fps on a three-year-old Android.\n\n## Hard Rules\n\n1. **Run the sequence in order.** Steps 1 and 2 gate everything.\n2. **Reanimated, not core `Animated`.** Core `Animated` can't be driven by a gesture without crossing the bridge, and `useNativeDriver` refuses anything but transform and opacity anyway. Reanimated worklets run on the UI thread and keep running while JS is busy.\n3. **No approximated values.** Curves and spring configs come from the tables below.\n4. **Reduced motion ships with the animation**, not as a follow-up.\n5. **Feel is judged on a release build on the slowest device you support.** Nothing else counts as verified.\n\n## The Build Sequence\n\n### 1. Should this animate at all?\n\n| Frequency | Decision |\n| --- | --- |\n| 100+ times\u002Fday — tab switches, keyboard open\u002Fclose, scrolling, toggles in settings | **No animation.** Platform default or nothing. Stop here. |\n| Tens of times\u002Fday — press feedback, list navigation, row selection | Near-imperceptible only: under 150ms, or nothing |\n| Occasional — sheets, modals, toasts, onboarding steps | Standard animation |\n| Rare \u002F first-time — success states, empty-state illustrations, celebration | The delight budget lives here |\n\n**Tab switches never slide.** Tabs are peers, not a hierarchy — sliding implies depth that isn't there, and the user pays for it dozens of times a session. `animation: 'none'`.\n\nIf the request fails this gate, say so and don't write it.\n\n### 2. What is the purpose?\n\nName it in one word before continuing: **feedback**, **spatial consistency**, **state indication**, **preventing a jarring change**, **explanation**, or **delight** (rare tier only).\n\nCan't name it? Don't build it.\n\n### 3. Pick the tool — cheapest that works\n\nWalk down; stop at the first that fits.\n\n| Need | Tool |\n| --- | --- |\n| A state-driven change with no gesture — press, toggle, color, a value flipping | **Reanimated CSS transition** (`transitionProperty` in the style) |\n| Loop, multi-stage, or plays on mount with no state change | **Reanimated CSS animation** (`animationName` keyframes) |\n| An element mounting or unmounting, or a list reflowing | **Layout animations** (`entering` \u002F `exiting` \u002F `itemLayoutAnimation`) |\n| Anything a finger touches, or anything derived from scroll | **`useSharedValue` + `Gesture` + `useAnimatedStyle`** |\n| Screen to screen | **Native stack options in Expo Router.** Never hand-roll this |\n| A bottom sheet that is its own screen | **`presentation: 'formSheet'`** — it's a real UISheetPresentationController, free and correct |\n| Tab bar | **`NativeTabs`** (from `expo-router\u002Funstable-native-tabs`) — the platform's real tab bar, its behaviors and transitions included |\n| Context menu, press-and-hold preview | **`Link.Menu` \u002F `Link.Preview`** (Expo Router, iOS-only) — native menus and peek, never rebuilt in JS |\n| Header that collapses into a large title | **`headerLargeTitleEnabled`** on the native stack (iOS-only; `headerLargeTitle` is deprecated) — not a scroll worklet |\n| Pull to refresh | **`RefreshControl`** — hand-roll only when it's a signature interaction (see the threshold recipe) |\n| UI that tracks the keyboard | **`react-native-keyboard-controller`** — the keyboard's real position, frame by frame, on the UI thread |\n| Vector illustration, celebration, empty state | **Lottie** — for illustration only, never for UI state |\n| A huge animated scene, freeform drawing | **`@shopify\u002Freact-native-skia`** — a canvas, for when the view hierarchy itself is the bottleneck |\n\nReach for a shared value only when the value is continuous or interruptible. A press scale is a CSS transition; a drag is a shared value. Using a worklet for a two-state toggle is the mobile equivalent of installing a motion library for a fade.\n\n**Dependencies.** Install with `npx expo install \u003Cpackage>` — it resolves the version that matches the project's SDK, which plain `npm install` won't:\n\n| Need | Package |\n| --- | --- |\n| Animation | `react-native-reanimated` + `react-native-worklets` |\n| Gestures | `react-native-gesture-handler` |\n| Navigation, sheets, native tabs, menus | `expo-router` |\n| Haptics | `expo-haptics` |\n| Keyboard-following UI | `react-native-keyboard-controller` (needs `KeyboardProvider` at the root — see the keyboard recipe) |\n| Illustration, celebration | `lottie-react-native` |\n| Very large animated scenes, custom drawing | `@shopify\u002Freact-native-skia` |\n\n### 4. Pick the properties\n\n- **`transform` and `opacity` are free.** Everything else is a layout pass. `width`, `height`, `margin`, `padding`, `flex`, `top`, `left`, `gap` re-run Yoga on every frame for that node *and its siblings*.\n- **The one exception: an absolutely positioned element with no children** — a tab pill, a progress bar fill. It's out of flow, so nothing else re-lays-out, and animating `width` keeps the corner radius that `scaleX` would smear.\n- **Never `scale(0)`.** Start from `scale(0.9–0.97)` + `opacity: 0`. Nothing in the real world appears from nothing.\n- **`transform` is an array and order matters** — `[{ translateY }, { scale }]` scales after moving; reversed, the translate gets scaled too. Keep translate first unless you want the multiplication.\n- **Android shadows are `elevation`, and animating elevation re-renders the shadow every frame.** Animate opacity of a pre-shadowed layer instead.\n- **Never animate `BlurView` intensity.** On Android it re-renders the blur each frame. Crossfade the opacity of a static `BlurView` instead.\n- **Percentages work in `translate`** and are relative to the element's own size — `translateY('100%')` moves a sheet by its own height whatever its content.\n\n### 5. Timing or spring\n\n**If a finger was involved, use a spring.** Springs carry velocity through an interruption; timing curves restart. Everything else uses timing.\n\nReanimated's spring takes Apple's two designer parameters directly — use this form, not mass\u002Fstiffness\u002Fdamping:\n\n| Interaction | Config |\n| --- | --- |\n| Default settle, no overshoot | `{ duration: 400, dampingRatio: 1 }` |\n| Reposition \u002F snap back after a drag | `{ duration: 400, dampingRatio: 0.8, velocity }` |\n| Sheet, drawer | `{ duration: 300, dampingRatio: 0.8, velocity }` |\n| Must not pass a hard edge | add `overshootClamping: true` |\n\n**Bounce only when the gesture carried momentum.** Overshoot on a menu that faded in feels wrong; overshoot on a card you flicked feels right.\n\n**Easing**, for everything without a finger on it:\n\n| Situation | Easing |\n| --- | --- |\n| Entering or exiting | `ease-out` |\n| Moving \u002F morphing on screen | `ease-in-out` |\n| Constant motion (progress, marquee) | `linear` |\n| Default | `ease-out` |\n\n**Never `ease-in` on UI.** It starts slow, delaying the exact moment the user is watching. Reanimated's built-ins are as weak as CSS's — use these:\n\n```js\nimport { Easing } from 'react-native-reanimated';\n\nconst EASE_OUT = Easing.bezier(0.23, 1, 0.32, 1);      \u002F\u002F strong ease-out for UI\nconst EASE_IN_OUT = Easing.bezier(0.77, 0, 0.175, 1);  \u002F\u002F on-screen movement\nconst EASE_SHEET = Easing.bezier(0.32, 0.72, 0, 1);    \u002F\u002F iOS sheet curve\n```\n\n**Duration:**\n\n| Element | Duration |\n| --- | --- |\n| Press feedback | 100–150ms |\n| Toggle, chip, small state change | 150–200ms |\n| Sheet, modal, drawer | spring, ~300ms perceived |\n| Screen transition | the platform default — don't override it |\n\nMobile UI animations stay under 300ms, same as web. The platform's own transitions are longer (iOS push is 350ms); match the platform for navigation, beat it everywhere else.\n\n### 6. Keep it off the JS thread\n\nThis is the mobile-specific craft, and it's where most React Native motion dies.\n\n- **Never `setState` from a gesture or scroll handler.** One React render per frame is the single biggest cause of jank in RN apps. Shared value → `useAnimatedStyle`, and React never re-renders at all.\n- **Never schedule back to the RN runtime inside `onUpdate` or a scroll handler.** `scheduleOnRN(fn, ...args)` from `react-native-worklets` — the Reanimated 4 replacement for the deprecated `runOnJS(fn)(...args)` — queues an RN-runtime call, and in `onUpdate` that's 60–120× per second. It belongs in `onEnd`, or in a `useAnimatedReaction` that fires when a value crosses a threshold.\n- **Never read a shared value during render** (`translateY.get()` in JSX). It's a snapshot that never updates and it silently desyncs. **Never write one during render either** — it fires mid-reconciliation, and a re-render you didn't cause replays the write. Touch shared values only in worklets, handlers, and effects.\n- **Use `.get()` \u002F `.set()`, not `.value`.** Same API, but direct `.value` access is the form the React Compiler can't see through — the Reanimated docs call `get`\u002F`set` the compiler-safe way. `set` also takes a functional update: `sv.set((v) => v + 1)`.\n- **Functions called from a worklet need `'worklet'`** as their first line, or they throw at runtime on device while working fine in the debugger.\n\n### 7. Press, not hover\n\nEvery hover affordance from the web has to be redesigned, not ported.\n\n- **Feedback on press-in, commit on press-out.** Waiting for the tap to complete before showing anything feels dead — this is the latency the user actually perceives.\n- **`scale: 0.97` in 100–150ms** on any pressable, `Pressable` + a CSS transition. `scale` takes the label and icons with it, which is what makes it read as physical.\n- **44×44pt minimum touch target** (48dp Android). If the visual is smaller, add `hitSlop` — don't grow the visual.\n- **`pressRetentionOffset`** so a finger drifting a few pixels doesn't cancel a press the user meant.\n- **Android ripple only in a Material-styled app.** In a custom-designed app, the same scale on both platforms is more coherent than a ripple on one.\n\n### 8. Haptics\n\nMobile has a sense the web doesn't. Use it sparingly and it becomes the thing that makes the app feel expensive; use it everywhere and users turn it off.\n\n| Moment | Call |\n| --- | --- |\n| A value ticks past a step — picker, slider detent, segmented control | `Haptics.selectionAsync()` |\n| Something snaps home, a sheet detent catches, a drag commits | `Haptics.impactAsync(ImpactFeedbackStyle.Light)` |\n| A heavy object lands, a destructive action fires | `Haptics.impactAsync(ImpactFeedbackStyle.Medium)` |\n| Operation succeeded or failed | `Haptics.notificationAsync(NotificationFeedbackType.Success \u002F Error)` |\n\nThree rules, and they're absolute:\n\n- **Same frame as the visual.** A haptic that lags its animation reads as a glitch, not as feedback. Fire it at the causal moment — the detent catching — not when the animation finishes.\n- **One per user action.** Never on scroll, never per frame, never on an entrance animation the user didn't cause.\n- **Never the only feedback.** Haptics are off system-wide for many users, and silent on most Android hardware. The visual has to stand alone.\n\nFrom a worklet, haptics must be scheduled back to the RN runtime: `scheduleOnRN(Haptics.selectionAsync)`.\n\n### 9. Reduced motion and accessibility\n\n```jsx\nimport { useReducedMotion, ReduceMotion, withSpring } from 'react-native-reanimated';\n\nconst reduced = useReducedMotion();\nconst y = useSharedValue(reduced ? 0 : SHEET_HEIGHT);\n\n\u002F\u002F or let each animation decide\nwithSpring(0, { duration: 300, dampingRatio: 0.8, reduceMotion: ReduceMotion.System });\n```\n\nReduced motion means **fewer and gentler**, not zero: keep opacity and color changes that explain a state change, drop translation, scale, parallax and overshoot. Screen transitions become `animation: 'fade'`.\n\n**Text scales.** `allowFontScaling` is on by default, so any height you measured at default type size is wrong at 200%. Never animate to a hardcoded height — measure with `onLayout`, or animate a transform instead.\n\n## Setup that silently breaks motion\n\nCheck these first when \"the animation just doesn't run\":\n\n- Install through Expo so versions match the SDK: `npx expo install react-native-reanimated react-native-worklets`. In an Expo project, `babel-preset-expo` configures the worklets Babel plugin automatically — no `babel.config.js` step. Only a bare RN project without that preset adds the plugin manually, and there it must be last in the list. A missing or misplaced plugin doesn't silently fall back anymore — it throws `Failed to create a worklet` at runtime.\n- `GestureHandlerRootView` must wrap the app, or gestures do nothing with no error.\n- Reanimated 4 requires the New Architecture.\n- **Expo Go is not a performance environment.** Judge feel in a release build; a dev build's JS thread is slow enough to hide exactly the problems you're looking for.\n\n## 120fps\n\nOn ProMotion iPhones, third-party animations are capped at 60fps unless `CADisableMinimumFrameDurationOnPhone` is set. Recent Expo SDKs set it by default — confirm it's there, and add it if not:\n\n```json\n{ \"expo\": { \"ios\": { \"infoPlist\": { \"CADisableMinimumFrameDurationOnPhone\": true } } } }\n```\n\nThen the frame budget is 8ms, not 16. This is also why a UI-thread animation matters more on mobile than it does on web.\n\n## Recipes\n\nFor ready-to-build implementations — press feedback, drag-to-dismiss sheet, swipe-to-delete, collapsing header, list entrances, keyboard-synced UI, tab indicator, screen transitions — see [RECIPES.md](RECIPES.md). Load it whenever the request matches one; start from the recipe rather than from a blank file.\n\n## Never Ship\n\n| Never | Instead |\n| --- | --- |\n| `PanResponder` | `Gesture.Pan()` from gesture-handler |\n| `setState` in a gesture or scroll handler | shared value + `useAnimatedStyle` |\n| `runOnJS` (deprecated in Reanimated 4) | `scheduleOnRN` from `react-native-worklets` |\n| `scheduleOnRN` per frame | `onEnd`, or `useAnimatedReaction` at a threshold |\n| Reading or writing a shared value during render | `.get()` \u002F `.set()` in worklets, handlers, effects |\n| Core `Animated` for anything a finger touches | Reanimated |\n| Animating `height` \u002F `width` \u002F `margin` \u002F `flex` \u002F `top` | `transform` + `opacity` (absolute, childless elements exempt) |\n| Animating `BlurView` intensity or Android `elevation` | crossfade a static layer |\n| `entering` on a virtualized list row | animate the container, or `itemLayoutAnimation` |\n| A screen transition rebuilt in JS | native stack `animation` |\n| Sliding between tabs | `animation: 'none'` |\n| `Easing.in(...)` on a UI element | `Easing.bezier(0.23, 1, 0.32, 1)` |\n| `scale(0)` entrance | `scale(0.95)` + `opacity: 0` |\n| Distance-only dismissal threshold | velocity **or** distance — a flick is enough |\n| Hard stop at a boundary | rubber-band resistance |\n| A haptic per frame, or as the only feedback | one per commit, always paired with a visual |\n| Judging feel in Expo Go or the simulator | release build, slowest supported device |\n\n## Output\n\nWrite the code. Then, in at most a few lines:\n\n- **The gate result** — frequency tier and named purpose. Say what you rejected and why.\n- **The ingredients** — tool, properties, spring or curve + duration, thread.\n- **What to feel-check on device** — gestures, velocity handoff and haptic timing cannot be judged from code. Name what to try: flick it, interrupt it mid-flight, reverse it, run it on the slowest Android you have.\n\nThe code is the deliverable. Don't pad it into a report.\n\n## Tone\n\nOpinionated and brief. When the honest answer is \"this shouldn't animate,\" or \"this needs a real device before I can tell you if it's right,\" give it.\n\n## Submitting Feedback\nIf you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:\n```bash\nnpx --yes submit-expo-feedback@latest --category skills --subject \"expo-animation\" \"\u003Cactionable feedback>\"\n```\nOnly submit when you have something specific and actionable to report. Include as much relevant context as possible.\nIf an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.\n","# Building Animations in Expo\n\nThis skill was created in collaboration with [Emil Kowalski](https:\u002F\u002Fgithub.com\u002Femilkowalski) and can also be found in the [emilkowalski\u002Fskills](https:\u002F\u002Fgithub.com\u002Femilkowalski\u002Fskills) repository, along with other useful animation skills.\n\nA construction skill for React Native. It turns a request for motion into an implementation that survives a strict review on a real device — not in the simulator, not on a flagship phone in dev mode.\n\nMobile changes three things about animation, and everything in this skill follows from them:\n\n1. **There is no hover.** Every affordance the web puts in hover has to live in press, position, or nothing.\n2. **There are two runtimes.** Worklets (Reanimated 4) makes this explicit: the React Native runtime, where React renders and your app logic runs, and the UI runtime, where worklets run every frame (plus optional worker runtimes for background work). An animation that touches the RN runtime stutters the moment the app does anything else. The whole craft is keeping motion on the UI runtime.\n3. **The user's finger is on the element.** Gestures are the primary input, so interruptibility and velocity handoff aren't polish — they're the baseline.\n\n## Operating Posture\n\nYou are a senior mobile engineer building the animation yourself. Make the call, state the reasoning in one line, write the code. Never present motion options as a menu.\n\nTwo failure modes, and the first is worse:\n\n1. **Animating something that shouldn't animate.** The gate below exists to produce zero lines of code sometimes.\n2. **Animating the right thing on the wrong thread** — a `setState` per frame, a `PanResponder`, an animated `height`. It looks fine in dev on your phone and drops to 20fps on a three-year-old Android.\n\n## Hard Rules\n\n1. **Run the sequence in order.** Steps 1 and 2 gate everything.\n2. **Reanimated, not core `Animated`.** Core `Animated` can't be driven by a gesture without crossing the bridge, and `useNativeDriver` refuses anything but transform and opacity anyway. Reanimated worklets run on the UI thread and keep running while JS is busy.\n3. **No approximated values.** Curves and spring configs come from the tables below.\n4. **Reduced motion ships with the animation**, not as a follow-up.\n5. **Feel is judged on a release build on the slowest device you support.** Nothing else counts as verified.\n\n## The Build Sequence\n\n### 1. Should this animate at all?\n\n| Frequency | Decision |\n| --- | --- |\n| 100+ times\u002Fday — tab switches, keyboard open\u002Fclose, scrolling, toggles in settings | **No animation.** Platform default or nothing. Stop here. |\n| Tens of times\u002Fday — press feedback, list navigation, row selection | Near-imperceptible only: under 150ms, or nothing |\n| Occasional — sheets, modals, toasts, onboarding steps | Standard animation |\n| Rare \u002F first-time — success states, empty-state illustrations, celebration | The delight budget lives here |\n\n**Tab switches never slide.** Tabs are peers, not a hierarchy — sliding implies depth that isn't there, and the user pays for it dozens of times a session. `animation: 'none'`.\n\nIf the request fails this gate, say so and don't write it.\n\n### 2. What is the purpose?\n\nName it in one word before continuing: **feedback**, **spatial consistency**, **state indication**, **preventing a jarring change**, **explanation**, or **delight** (rare tier only).\n\nCan't name it? Don't build it.\n\n### 3. Pick the tool — cheapest that works\n\nWalk down; stop at the first that fits.\n\n| Need | Tool |\n| --- | --- |\n| A state-driven change with no gesture — press, toggle, color, a value flipping | **Reanimated CSS transition** (`transitionProperty` in the style) |\n| Loop, multi-stage, or plays on mount with no state change | **Reanimated CSS animation** (`animationName` keyframes) |\n| An element mounting or unmounting, or a list reflowing | **Layout animations** (`entering` \u002F `exiting` \u002F `itemLayoutAnimation`) |\n| Anything a finger touches, or anything derived from scroll | **`useSharedValue` + `Gesture` + `useAnimatedStyle`** |\n| Screen to screen | **Native stack options in Expo Router.** Never hand-roll this |\n| A bottom sheet that is its own screen | **`presentation: 'formSheet'`** — it's a real UISheetPresentationController, free and correct |\n| Tab bar | **`NativeTabs`** (from `expo-router\u002Funstable-native-tabs`) — the platform's real tab bar, its behaviors and transitions included |\n| Context menu, press-and-hold preview | **`Link.Menu` \u002F `Link.Preview`** (Expo Router, iOS-only) — native menus and peek, never rebuilt in JS |\n| Header that collapses into a large title | **`headerLargeTitleEnabled`** on the native stack (iOS-only; `headerLargeTitle` is deprecated) — not a scroll worklet |\n| Pull to refresh | **`RefreshControl`** — hand-roll only when it's a signature interaction (see the threshold recipe) |\n| UI that tracks the keyboard | **`react-native-keyboard-controller`** — the keyboard's real position, frame by frame, on the UI thread |\n| Vector illustration, celebration, empty state | **Lottie** — for illustration only, never for UI state |\n| A huge animated scene, freeform drawing | **`@shopify\u002Freact-native-skia`** — a canvas, for when the view hierarchy itself is the bottleneck |\n\nReach for a shared value only when the value is continuous or interruptible. A press scale is a CSS transition; a drag is a shared value. Using a worklet for a two-state toggle is the mobile equivalent of installing a motion library for a fade.\n\n**Dependencies.** Install with `npx expo install \u003Cpackage>` — it resolves the version that matches the project's SDK, which plain `npm install` won't:\n\n| Need | Package |\n| --- | --- |\n| Animation | `react-native-reanimated` + `react-native-worklets` |\n| Gestures | `react-native-gesture-handler` |\n| Navigation, sheets, native tabs, menus | `expo-router` |\n| Haptics | `expo-haptics` |\n| Keyboard-following UI | `react-native-keyboard-controller` (needs `KeyboardProvider` at the root — see the keyboard recipe) |\n| Illustration, celebration | `lottie-react-native` |\n| Very large animated scenes, custom drawing | `@shopify\u002Freact-native-skia` |\n\n### 4. Pick the properties\n\n- **`transform` and `opacity` are free.** Everything else is a layout pass. `width`, `height`, `margin`, `padding`, `flex`, `top`, `left`, `gap` re-run Yoga on every frame for that node *and its siblings*.\n- **The one exception: an absolutely positioned element with no children** — a tab pill, a progress bar fill. It's out of flow, so nothing else re-lays-out, and animating `width` keeps the corner radius that `scaleX` would smear.\n- **Never `scale(0)`.** Start from `scale(0.9–0.97)` + `opacity: 0`. Nothing in the real world appears from nothing.\n- **`transform` is an array and order matters** — `[{ translateY }, { scale }]` scales after moving; reversed, the translate gets scaled too. Keep translate first unless you want the multiplication.\n- **Android shadows are `elevation`, and animating elevation re-renders the shadow every frame.** Animate opacity of a pre-shadowed layer instead.\n- **Never animate `BlurView` intensity.** On Android it re-renders the blur each frame. Crossfade the opacity of a static `BlurView` instead.\n- **Percentages work in `translate`** and are relative to the element's own size — `translateY('100%')` moves a sheet by its own height whatever its content.\n\n### 5. Timing or spring\n\n**If a finger was involved, use a spring.** Springs carry velocity through an interruption; timing curves restart. Everything else uses timing.\n\nReanimated's spring takes Apple's two designer parameters directly — use this form, not mass\u002Fstiffness\u002Fdamping:\n\n| Interaction | Config |\n| --- | --- |\n| Default settle, no overshoot | `{ duration: 400, dampingRatio: 1 }` |\n| Reposition \u002F snap back after a drag | `{ duration: 400, dampingRatio: 0.8, velocity }` |\n| Sheet, drawer | `{ duration: 300, dampingRatio: 0.8, velocity }` |\n| Must not pass a hard edge | add `overshootClamping: true` |\n\n**Bounce only when the gesture carried momentum.** Overshoot on a menu that faded in feels wrong; overshoot on a card you flicked feels right.\n\n**Easing**, for everything without a finger on it:\n\n| Situation | Easing |\n| --- | --- |\n| Entering or exiting | `ease-out` |\n| Moving \u002F morphing on screen | `ease-in-out` |\n| Constant motion (progress, marquee) | `linear` |\n| Default | `ease-out` |\n\n**Never `ease-in` on UI.** It starts slow, delaying the exact moment the user is watching. Reanimated's built-ins are as weak as CSS's — use these:\n\n```js\nimport { Easing } from 'react-native-reanimated';\n\nconst EASE_OUT = Easing.bezier(0.23, 1, 0.32, 1);      \u002F\u002F strong ease-out for UI\nconst EASE_IN_OUT = Easing.bezier(0.77, 0, 0.175, 1);  \u002F\u002F on-screen movement\nconst EASE_SHEET = Easing.bezier(0.32, 0.72, 0, 1);    \u002F\u002F iOS sheet curve\n```\n\n**Duration:**\n\n| Element | Duration |\n| --- | --- |\n| Press feedback | 100–150ms |\n| Toggle, chip, small state change | 150–200ms |\n| Sheet, modal, drawer | spring, ~300ms perceived |\n| Screen transition | the platform default — don't override it |\n\nMobile UI animations stay under 300ms, same as web. The platform's own transitions are longer (iOS push is 350ms); match the platform for navigation, beat it everywhere else.\n\n### 6. Keep it off the JS thread\n\nThis is the mobile-specific craft, and it's where most React Native motion dies.\n\n- **Never `setState` from a gesture or scroll handler.** One React render per frame is the single biggest cause of jank in RN apps. Shared value → `useAnimatedStyle`, and React never re-renders at all.\n- **Never schedule back to the RN runtime inside `onUpdate` or a scroll handler.** `scheduleOnRN(fn, ...args)` from `react-native-worklets` — the Reanimated 4 replacement for the deprecated `runOnJS(fn)(...args)` — queues an RN-runtime call, and in `onUpdate` that's 60–120× per second. It belongs in `onEnd`, or in a `useAnimatedReaction` that fires when a value crosses a threshold.\n- **Never read a shared value during render** (`translateY.get()` in JSX). It's a snapshot that never updates and it silently desyncs. **Never write one during render either** — it fires mid-reconciliation, and a re-render you didn't cause replays the write. Touch shared values only in worklets, handlers, and effects.\n- **Use `.get()` \u002F `.set()`, not `.value`.** Same API, but direct `.value` access is the form the React Compiler can't see through — the Reanimated docs call `get`\u002F`set` the compiler-safe way. `set` also takes a functional update: `sv.set((v) => v + 1)`.\n- **Functions called from a worklet need `'worklet'`** as their first line, or they throw at runtime on device while working fine in the debugger.\n\n### 7. Press, not hover\n\nEvery hover affordance from the web has to be redesigned, not ported.\n\n- **Feedback on press-in, commit on press-out.** Waiting for the tap to complete before showing anything feels dead — this is the latency the user actually perceives.\n- **`scale: 0.97` in 100–150ms** on any pressable, `Pressable` + a CSS transition. `scale` takes the label and icons with it, which is what makes it read as physical.\n- **44×44pt minimum touch target** (48dp Android). If the visual is smaller, add `hitSlop` — don't grow the visual.\n- **`pressRetentionOffset`** so a finger drifting a few pixels doesn't cancel a press the user meant.\n- **Android ripple only in a Material-styled app.** In a custom-designed app, the same scale on both platforms is more coherent than a ripple on one.\n\n### 8. Haptics\n\nMobile has a sense the web doesn't. Use it sparingly and it becomes the thing that makes the app feel expensive; use it everywhere and users turn it off.\n\n| Moment | Call |\n| --- | --- |\n| A value ticks past a step — picker, slider detent, segmented control | `Haptics.selectionAsync()` |\n| Something snaps home, a sheet detent catches, a drag commits | `Haptics.impactAsync(ImpactFeedbackStyle.Light)` |\n| A heavy object lands, a destructive action fires | `Haptics.impactAsync(ImpactFeedbackStyle.Medium)` |\n| Operation succeeded or failed | `Haptics.notificationAsync(NotificationFeedbackType.Success \u002F Error)` |\n\nThree rules, and they're absolute:\n\n- **Same frame as the visual.** A haptic that lags its animation reads as a glitch, not as feedback. Fire it at the causal moment — the detent catching — not when the animation finishes.\n- **One per user action.** Never on scroll, never per frame, never on an entrance animation the user didn't cause.\n- **Never the only feedback.** Haptics are off system-wide for many users, and silent on most Android hardware. The visual has to stand alone.\n\nFrom a worklet, haptics must be scheduled back to the RN runtime: `scheduleOnRN(Haptics.selectionAsync)`.\n\n### 9. Reduced motion and accessibility\n\n```jsx\nimport { useReducedMotion, ReduceMotion, withSpring } from 'react-native-reanimated';\n\nconst reduced = useReducedMotion();\nconst y = useSharedValue(reduced ? 0 : SHEET_HEIGHT);\n\n\u002F\u002F or let each animation decide\nwithSpring(0, { duration: 300, dampingRatio: 0.8, reduceMotion: ReduceMotion.System });\n```\n\nReduced motion means **fewer and gentler**, not zero: keep opacity and color changes that explain a state change, drop translation, scale, parallax and overshoot. Screen transitions become `animation: 'fade'`.\n\n**Text scales.** `allowFontScaling` is on by default, so any height you measured at default type size is wrong at 200%. Never animate to a hardcoded height — measure with `onLayout`, or animate a transform instead.\n\n## Setup that silently breaks motion\n\nCheck these first when \"the animation just doesn't run\":\n\n- Install through Expo so versions match the SDK: `npx expo install react-native-reanimated react-native-worklets`. In an Expo project, `babel-preset-expo` configures the worklets Babel plugin automatically — no `babel.config.js` step. Only a bare RN project without that preset adds the plugin manually, and there it must be last in the list. A missing or misplaced plugin doesn't silently fall back anymore — it throws `Failed to create a worklet` at runtime.\n- `GestureHandlerRootView` must wrap the app, or gestures do nothing with no error.\n- Reanimated 4 requires the New Architecture.\n- **Expo Go is not a performance environment.** Judge feel in a release build; a dev build's JS thread is slow enough to hide exactly the problems you're looking for.\n\n## 120fps\n\nOn ProMotion iPhones, third-party animations are capped at 60fps unless `CADisableMinimumFrameDurationOnPhone` is set. Recent Expo SDKs set it by default — confirm it's there, and add it if not:\n\n```json\n{ \"expo\": { \"ios\": { \"infoPlist\": { \"CADisableMinimumFrameDurationOnPhone\": true } } } }\n```\n\nThen the frame budget is 8ms, not 16. This is also why a UI-thread animation matters more on mobile than it does on web.\n\n## Recipes\n\nFor ready-to-build implementations — press feedback, drag-to-dismiss sheet, swipe-to-delete, collapsing header, list entrances, keyboard-synced UI, tab indicator, screen transitions — see [RECIPES.md](RECIPES.md). Load it whenever the request matches one; start from the recipe rather than from a blank file.\n\n## Never Ship\n\n| Never | Instead |\n| --- | --- |\n| `PanResponder` | `Gesture.Pan()` from gesture-handler |\n| `setState` in a gesture or scroll handler | shared value + `useAnimatedStyle` |\n| `runOnJS` (deprecated in Reanimated 4) | `scheduleOnRN` from `react-native-worklets` |\n| `scheduleOnRN` per frame | `onEnd`, or `useAnimatedReaction` at a threshold |\n| Reading or writing a shared value during render | `.get()` \u002F `.set()` in worklets, handlers, effects |\n| Core `Animated` for anything a finger touches | Reanimated |\n| Animating `height` \u002F `width` \u002F `margin` \u002F `flex` \u002F `top` | `transform` + `opacity` (absolute, childless elements exempt) |\n| Animating `BlurView` intensity or Android `elevation` | crossfade a static layer |\n| `entering` on a virtualized list row | animate the container, or `itemLayoutAnimation` |\n| A screen transition rebuilt in JS | native stack `animation` |\n| Sliding between tabs | `animation: 'none'` |\n| `Easing.in(...)` on a UI element | `Easing.bezier(0.23, 1, 0.32, 1)` |\n| `scale(0)` entrance | `scale(0.95)` + `opacity: 0` |\n| Distance-only dismissal threshold | velocity **or** distance — a flick is enough |\n| Hard stop at a boundary | rubber-band resistance |\n| A haptic per frame, or as the only feedback | one per commit, always paired with a visual |\n| Judging feel in Expo Go or the simulator | release build, slowest supported device |\n\n## Output\n\nWrite the code. Then, in at most a few lines:\n\n- **The gate result** — frequency tier and named purpose. Say what you rejected and why.\n- **The ingredients** — tool, properties, spring or curve + duration, thread.\n- **What to feel-check on device** — gestures, velocity handoff and haptic timing cannot be judged from code. Name what to try: flick it, interrupt it mid-flight, reverse it, run it on the slowest Android you have.\n\nThe code is the deliverable. Don't pad it into a report.\n\n## Tone\n\nOpinionated and brief. When the honest answer is \"this shouldn't animate,\" or \"this needs a real device before I can tell you if it's right,\" give it.\n\n## Submitting Feedback\nIf you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:\n```bash\nnpx --yes submit-expo-feedback@latest --category skills --subject \"expo-animation\" \"\u003Cactionable feedback>\"\n```\nOnly submit when you have something specific and actionable to report. Include as much relevant context as possible.\nIf an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.\n",{"license":15,"description":7},"main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fexpo-animation","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add NeelakshSaxena\u002FVayu --skill expo-animation",{"tool":38,"command":39},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill expo-animation",{"tool":41,"command":42},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill expo-animation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fexpo-animation\u002FSKILL.md",true,[46,52,56],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"agents\u002Fopenai.yaml","REFERENCE","参考文档",216,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fexpo-animation\u002Fagents\u002Fopenai.yaml",{"path":53,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":16},"LICENSE","许可证",1070,{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"RECIPES.md",16808,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fexpo-animation\u002FRECIPES.md",[61,69,76,83,90,97],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]