mastering-animate-presence

Audit Framer Motion AnimatePresence code for exit animations and mode selection.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/JuanJoseGonGi/skills --skill mastering-animate-presence-juanjosegongi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mastering-animate-presence
Source: https://github.com/JuanJoseGonGi/skills/tree/main/mastering-animate-presence
Command: npx skills add https://github.com/JuanJoseGonGi/skills --skill mastering-animate-presence-juanjosegongi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers ensure their use of Framer Motion's AnimatePresence component follows best practices, preventing common issues with exit animations, presence hooks, and mode selection.

Core Features & Use Cases

  • Exit Animation Auditing: Checks for missing exit props, incorrect key usage, and mismatched animations.
  • Presence Hook Validation: Ensures useIsPresent and usePresence are used correctly within the component tree and with safeToRemove.
  • Mode Configuration Review: Identifies potential conflicts or suboptimal usage of AnimatePresence modes like wait, sync, and popLayout.
  • Use Case: When reviewing a complex UI component that uses animations for modals or list items, this Skill can quickly flag any AnimatePresence configurations that might lead to janky animations or unexpected behavior.

Quick Start

Run the mastering-animate-presence skill to audit the file './src/components/AnimatedList.tsx' for AnimatePresence best practices.

Frequently Asked Questions about mastering-animate-presence

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Framer Motion AnimatePresence for exit animations and hooks?

To audit Framer Motion AnimatePresence, review components for missing exit props, incorrect key usage, and mismatched animations. Validate presence hooks like useIsPresent and usePresence to ensure safeToRemove is called correctly within the component tree.

Why does my AnimatePresence exit animation not working in React?

AnimatePresence exit animations fail when conditional rendering, dynamic lists, or hook usage bypass the component tree. Audit your code to ensure exit props are defined, keys match correctly, and interactions are disabled during animations to prevent janky behavior.

What is the best way to configure AnimatePresence modes like wait and popLayout?

The best way to configure AnimatePresence modes is to audit mode selection for conflicts. Review wait, sync, and popLayout configurations to ensure coordinated exits and timing align with best practices, preventing unexpected UI behavior during component transitions.

How do I use useIsPresent and usePresence hooks correctly with AnimatePresence?

Using useIsPresent and usePresence hooks correctly requires placing them within the AnimatePresence component tree. Audit hook usage to ensure safeToRemove is triggered appropriately and that presence state drives coordinated exit animations without timing mismatches.

Can I use AnimatePresence with conditional rendering in React UI components?

AnimatePresence supports conditional rendering in React but requires careful configuration. Audit your implementation to identify issues with dynamic lists and conditional components, ensuring exit animations trigger properly and keys remain consistent across renders.