Agent skill Web motion
Mastering Animate Presence
Design, implement or review motion on the web.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add https://github.com/raphaelsalaja/skills/tree/f2ebb04413252993c5245f5920fdf91b09b1915e/skills/mastering-animate-presence --skill mastering-animate-presence --agent claude-code --yesCheck this file in your project.claude/skills/mastering-animate-presence/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add https://github.com/raphaelsalaja/skills/tree/f2ebb04413252993c5245f5920fdf91b09b1915e/skills/mastering-animate-presence --skill mastering-animate-presenceSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. The pinned Raphael skill v2.0.0 and an existing React panel using Motion with AnimatePresence. Identify its installed package before editing.
View operation manualWhat this skill helps with
- Design, implement or review motion on the web.
Good for
- Web motion and transitions
- Publisher
- Raphael Salaja
- Control points
- AnimatePresence · propagate · useIsPresent · safeToRemove
- Result
- File-and-line findings or a reviewed exit lifecycle with verified nested removal.
- Skill name
mastering-animate-presence- Repository
raphaelsalaja/skills
Common pitfall
Avoid this prompt
Move AnimatePresence inside the conditional panel and leave its buttons clickable during exit.
Removing the boundary stops it from coordinating the exit. An exiting node can remain in the DOM long enough to take input.
Use these steps
- Inspect source and behavior
- Apply the documented technique
- Verify the original interaction
Project walkthrough
Audit a nested panel exit, keep its exit animation alive, and block interaction as it leaves.
Audit a nested panel exit, keep its exit animation alive, and block interaction as it leaves.
Inspect source and behavior
Inspect source and behavior
Prompt · Step 1Use Mastering AnimatePresence v2.0.0 to review [my nested reading panel]. Trace the persistent outer boundary, its conditional child’s stable key, the inner boundary, exit variants, and focus handoff. Report matching rule IDs and file:line references before making changes.Apply the documented technique
Apply the documented technique
Prompt · Step 2For the approved fix, keep the outer AnimatePresence mounted and use propagate on the nested boundary if its children should exit with the parent. Read useIsPresent from the exiting child and disable its action when false. If the panel uses a manual usePresence lifecycle, complete its own exit work then call safeToRemove and handle interruption or disposal.Verify the original interaction
A nested child exits, cannot be activated while leaving, and is removed on completion.
- A nested child exits, cannot be activated while leaving, and is removed on completion.
Prompt · Step 3Dismiss the original panel from its keyboard control and verify that child exit starts, its action is immediately unavailable, and the DOM removes the entire panel after exit. Retest a rapid reopen and confirm expected focus and no stranded child. Report which issue IDs cleared and what you measured.
Implementation lookup
Find the documented inputs and verification target for this walkthrough.
Check the control pointsInputs
- Command or reference
AnimatePresence · propagate · useIsPresent · safeToRemove- Examples
- A nested child exits, cannot be activated while leaving, and is removed on completion.
FAQ
Where should useIsPresent run?
Inside the disappearing child so it can read the presence state supplied by its boundary.
Where are the instructions?
Open the installed SKILL.md and following references for the selected technique. The publisher link points to the revision verified for this handbook.