mastering-animate-presence
Back to list

raphaelsalaja/mastering-animate-presence

Mastering Animate Presence

GitHub

Audit Motion and Framer Motion exit/presence patterns with practical fixes for AnimatePresence usage.

312 installsMotionInteractionFrontend4 demos

Real-world examples

Live HTML demos for this skill — rendered directly in the page. 4 examples.

  1. 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.

  2. 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.

  3. 03

    Wait-mode panel swap

    mode="wait" serializes exit→enter; transitions stay at ~150ms so the round-trip stays snappy — mode-wait-doubles-duration.

  4. 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