From animation-pro
This skill should be used when the user asks to "add animation to a component", "animate a list", "add a page transition", "make this drawer smoother", "add enter/exit animation", "implement spring physics", "add scroll animation", "add parallax", "animate on scroll", "add a gesture", "drag animation", "swipe interaction", "add micro-interactions", "tune spring parameters", "add hover animation", "animate a modal", "add Lottie animation", or mentions Motion, framer-motion, react-spring, AnimatePresence, useSpring, locomotive-scroll, anime.js, auto-animate, or Lottie. Covers UI transitions, gestures, scroll-driven animation, spring physics, enter/exit patterns, and accessibility compliance.
How this skill is triggered — by the user, by Claude, or both
Slash command
/animation-pro:motion-craftThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
UI animation skill covering transitions, gestures, micro-interactions, spring physics,
UI animation skill covering transitions, gestures, micro-interactions, spring physics,
scroll-driven animation, and enter/exit patterns. Every animation must pass the
Purpose Test and implement prefers-reduced-motion.
Before implementing any animation, verify it serves at least one purpose:
If none apply, do not animate. Report why and suggest a static alternative.
| Need | Tool | Bundle impact |
|---|---|---|
| Color, opacity, border-radius state change | CSS transition | 0 KB |
| Hover/focus feedback | CSS transition | 0 KB |
| Enter/exit (mount/unmount) | Motion AnimatePresence | ~18 KB gzipped |
| Layout reorder | Motion layout prop | (included with Motion) |
| Gesture-driven (drag, swipe, pinch) | Motion gesture system | (included with Motion) |
| Spring physics (any context) | Motion spring or react-spring | ~18 KB or ~12 KB |
| Staggered multi-element sequence | anime.js timeline or react-spring useTrail | ~7 KB or ~12 KB |
| Scroll-triggered reveal | CSS @scroll-timeline or Locomotive Scroll | 0 KB or ~15 KB |
| Designer handoff (After Effects) | Lottie | ~50 KB + JSON |
| Zero-config add/remove/reorder | auto-animate | ~2 KB |
Critical rule: Never add a library that duplicates functionality already installed.
Check package.json first:
grep -E '"(motion|framer-motion|react-spring|@react-spring|anime|animejs|gsap|lottie|locomotive-scroll|auto-animate)"' package.json
Spring parameters control feel. Two naming systems for the same physics:
| Feel | Motion config | react-spring config | Use case |
|---|---|---|---|
| Snappy | { stiffness: 400, damping: 30 } | { tension: 400, friction: 30 } | Buttons, menus |
| Natural | { stiffness: 300, damping: 25 } | { tension: 300, friction: 25 } | Panels, cards |
| Gentle | { stiffness: 200, damping: 20 } | { tension: 200, friction: 20 } | Content reveals |
| Bouncy | { stiffness: 500, damping: 15 } | { tension: 500, friction: 15 } | Playful UI |
| Critical | { stiffness: 400, damping: 40 } | { tension: 400, friction: 40 } | Modals, destructive |
| Heavy | { stiffness: 150, damping: 25, mass: 1.5 } | { tension: 150, friction: 25, mass: 1.5 } | Full-screen overlays |
Prefer springs over duration-based animation for interactive elements. Duration-based animation moves at fixed speed regardless of distance; springs adapt.
transform and opacity. Never width, height, top, left.will-change: transform sparingly, only on continuously animated elements.layout prop is expensive on large lists. Consider virtualizing first.AnimatePresence exit animations block unmounting. Keep exit duration < 200ms.Every animated component must respect prefers-reduced-motion. See
references/reduced-motion.md for the full implementation guide. Quick patterns:
CSS approach:
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
Motion approach:
import { useReducedMotion } from "motion/react";
const shouldReduce = useReducedMotion();
Degradation strategies: instant cut, reduced duration, alternative feedback, or removal.
See references/reduced-motion.md for when to use each.
Always verify Motion and react-spring APIs against source before writing code:
# Motion spring config
grep -r "stiffness\|damping\|mass\|spring" refs/motion/packages/motion/src/animation/
# Motion AnimatePresence
grep -r "AnimatePresence\|AnimatePresenceProps" refs/motion/packages/motion/src/
# react-spring
grep -r "SpringConfig\|tension\|friction" refs/react-spring/packages/core/src/
# Locomotive Scroll
grep -r "scroll\|parallax\|speed" refs/locomotive-scroll/src/
For detailed patterns and implementation guides, consult:
references/spring-physics.md: Spring parameter cheat sheet, tuning guide, presetsreferences/animation-purpose-test.md: When to animate vs. when not toreferences/css-vs-js-decision.md: CSS transitions vs. Motion vs. react-spring decision treereferences/scroll-animation.md: Scroll-triggered patterns, IntersectionObserver, parallaxreferences/gesture-patterns.md: Drag, swipe, pinch, long-press interaction modelsreferences/enter-exit.md: AnimatePresence patterns, list transitions, page transitionsreferences/lottie-workflow.md: After Effects to web pipeline, JSON format, player configreferences/reduced-motion.md: prefers-reduced-motion implementation patternsProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
npx claudepluginhub travis-gilbert/claude-marketplace --plugin animation-pro