Audit Motion and Framer Motion exit/presence patterns with practical fixes for AnimatePresence usage.
Real-world examples
Live HTML demos for this skill — rendered directly in the page. 4 examples.
- 01
Wrapped modal with symmetric exit
AnimatePresence wraps a conditional overlay; exit mirrors initial (opacity + y) so the dialog leaves the same way it entered — exit-requires-wrapper, exit-prop-required, exit-matches-initial.
- 02
Keyed list with popLayout
Stable item.id keys (never index) plus mode="popLayout" so removals don't fight siblings for space — exit-key-required, mode-pop-layout-for-lists, mode-sync-layout-conflict.
- 03
Wait-mode panel swap
mode="wait" serializes exit→enter; transitions stay at ~150ms so the round-trip stays snappy — mode-wait-doubles-duration.
- 04
Nested exits + safe interactions
Outer/inner AnimatePresence with propagate, coordinated durations, and useIsPresent disabling clicks while exiting — nested-propagate-required, nested-consistent-timing, presence-disable-interactions.
More from raphaelsalaja
- 12 Principles Of AnimationApply Disney's 12 animation principles to web interfaces to make motion feel natural, organic, and human.
- Generating Sounds With AiAudit Web Audio API code for procedural sound synthesis quality, UX decisions, and parameter best practices.
- Morphing IconsBuild icon components that morph between SVG shapes with smooth, line-based transformation.
- Pseudo ElementsAudit CSS pseudo-elements and View Transitions usage for hover effects, decorative layers, and transitions.
- Sounds On The WebAudit interface sound feedback for UX quality, accessibility, and practical implementation patterns.
- To Spring Or Not To SpringAudit animation timing choices to decide when springs versus easing curves produce better motion.