What does this skill do?

The React Skill Animation Patterns provides copy-and-paste, production-ready animation patterns for the most common UI components in React and Next.js. All patterns are built using tokens and springs from motion-foundations, ensuring visual consistency, accessibility, and SSR safety. It includes buttons with feedback, staggered lists, accessible modals, page transitions, and scroll-reveal effects.

Buttons with feedback
Add `whileHover` and `whileTap` with springs and reusable scale tokens for touch interactions.
Lists with stagger
Animate list items in sequence using `staggerChildren` and `delayChildren` for a smooth effect.
Accessible Manners
Create modals using focus trap, close with Escape, scroll blocking, role="dialog", and aria-modal="true".
Page Transitions
Configure transitions between routes in the Next.js App Router using `AnimatePresence mode="wait"`.

Usage examples

🔘 Animated button
Create a button with hover and tap feedback using motion-tokens springs.
📋 Staggered list
Generate a list with a stagger animation of 0.08 seconds between elements and a delay of 0.1 seconds.
🪟 Accessible Modal
Create a modal using AnimatePresence, a focus trap, close it with the Escape key, and set role="dialog".
📄 Page break
Set up a page transition for the Next.js App Router using mode="wait" and usePathname.

Features

Reusable tokens and springs All animations use durations, easings, and springs imported from motion-foundations, without inline values.
SSR Insurance The templates are designed to work correctly with server-side rendering in Next.js.
AnimatePresence is required Every conditional render is wrapped in `AnimatePresence` and has a stable key on the direct child.
Built-in Accessibility Modals include focus traps, the "Escape" button, scroll blocking, and correct ARIA attributes.
Pattern Selection Guide A decision table that maps each situation (appearance, list, route, layout) to the corresponding pattern.

Frequently asked questions

Yes. This skill assumes that your project uses the motion library (imported from motion/react) and a tokens file in @/lib/motion-tokens containing springs and motionTokens.
Yes. It includes specific patterns for page transitions using `usePathname` and `AnimatePresence mode="wait"`.
Yes. All templates are designed so as not to break server-side rendering in Next.js.
Yes. The patterns are imported from @/lib/motion-tokens, so you can define your own springs, durations, and easings while maintaining the structure.
React Animation Templates — Production-Ready Animations with Claude AI

¿Prefieres escuchar el contenido? Genera la narración de audio con un clic.