From frontend-toolkit
Add motion that communicates and stays cheap — animate compositor-only properties (transform/opacity), drive it off the main/JS thread, and honor reduced-motion preferences on web and React Native. Use when adding a transition or animation, building a motion-heavy interaction, fixing janky or expensive animation, or making motion respect prefers-reduced-motion / OS accessibility settings.
How this skill is triggered — by the user, by Claude, or both
Slash command
/frontend-toolkit:animation-and-motionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Stack-agnostic principles, concrete examples in React 19 and React Native.
Stack-agnostic principles, concrete examples in React 19 and React Native. The examples port to Vue/Svelte and to Motion/Reanimated; the judgments don't change.
Version targets: React 19, React Native 0.81 (current stable), with library
notes for Motion (motion/react) and Reanimated 4. Snippets grounded against
Context7 (/reactjs/react.dev, /facebook/react-native, swmansion Reanimated,
motion.dev) at authoring time — see references/snippets.md.
Every motion decision reduces to: what does this animation tell the user? Good motion communicates — it orients (where did this come from), gives feedback (your tap registered), or shows continuity (this list reordered, it didn't teleport). Motion that conveys nothing is cost without benefit, and on a slow device or for a motion-sensitive user it's actively harmful. If you can't name what an animation communicates, it's a candidate for deletion.
transform and opacity are handled by
the compositor and don't trigger layout or paint. Animating width, height,
top, margin, or box-shadow reflows the page every frame and drops frames.
On React Native the same split exists: useNativeDriver: true runs the animation
on the UI thread but only supports transform/opacity.prefers-reduced-motion
(web) and AccessibilityInfo.isReduceMotionEnabled() (RN). And reduce, don't
blindly remove: swap a large slide or scale for a quick cross-fade, keep the
essential state feedback. Ignoring this can trigger vestibular symptoms and fails
WCAG 2.3.3.setState in a
requestAnimationFrame/setInterval loop re-renders every frame and churns the
GC. Let the platform animate outside React's render: CSS, the Web Animations API,
Animated, or Reanimated worklets.transform) instead of animating layout properties directly.references/pitfalls.md.superpowers:brainstorming) and let them click, instead of asking in prose.
"Which of these feels right?" is for the companion; "what should this do?" stays
in the terminal.references/checklist.md against the motion you're adding or reviewing.references/snippets.md (reduced-motion hooks,
compositor-only CSS, the Motion config, RN native-driver Animated, Reanimated).references/pitfalls.md before you ship — most motion PRs hit at least one.state-managementstyling-systemsaccessibility-auditfrontend-performance (web) / native-performance (RN)touch-interactionsuperpowers:brainstorming (visual companion)npx claudepluginhub ravnhq/sasso-hq --plugin frontend-toolkitMines projects and conversations into a searchable memory palace. Activates on queries about MemPalace, memory palace, mining, searching, palace setup, wings, rooms, drawers, or recalling past work.
Whole-repo audit for over-engineering: finds dead code, unnecessary abstractions, stdlib-replaceable dependencies. Outputs ranked findings and net line/dep savings.