Skip to content
Back to skills

Ztx14 Curated State Transition Motion Presence

ASecurity

Coordinate enter/exit and presence transitions so components remain correct when state changes rapidly or routes unmount.

  • 14 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
developmentreactapi

Works with

  • api

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add Realjustawall/Perfect-AI --skill ztx14-curated-state-transition-motion-presence --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ztx14 Curated State Transition Motion Presence?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ztx14 Curated State Transition Motion Presence
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/realjustawall-ztx14-curated-state-transition-motion-presence/badge)](https://www.skillsdirectory.com/skills/realjustawall-ztx14-curated-state-transition-motion-presence)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ztx14-curated-state-transition-motion-presence
description: Coordinate enter/exit and presence transitions so components remain correct when state changes rapidly or routes unmount.
---

# Animate state transitions without making state animation-dependent

> Curated implementation skill. Inspect the installed project and actual component source before changing behavior. Do not assume latest APIs are installed. Preserve unrelated files and existing component ownership.

## Model states first
List stable states (`closed`, `opening`, `open`, `closing`, `disabled`, `error`) and allowed transitions before writing animation code. The state machine owns the truth; the animation only renders a transition between states.

## Rules
1. Use Motion presence facilities only when exit animation is desired and the component lifecycle supports it; otherwise keep a simpler CSS transition.
2. Ensure a second action interrupts or retargets the current animation deterministically.
3. Do not delay essential state updates until an animation completes. Respect cancellation and reduced-motion paths.
4. Keep keyboard focus valid when closing overlays/panels; restore it to the trigger if needed.
5. Avoid duplicate IDs and stale listeners while an exiting child remains mounted.
6. Test rapid open-close-open, route navigation during motion, reduced motion, and unmount during exit.

## Primary references
- [motion-hover](https://motion.dev/docs/react-hover-animation)
- [motion-scroll](https://motion.dev/docs/react-use-scroll)
- [react-effect](https://react.dev/reference/react/useEffect)
- [reduced-motion](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/%40media/prefers-reduced-motion)
- [wcag22](https://www.w3.org/TR/WCAG22/)

## Completion evidence
- State what was inspected, what changed, and which checks actually ran. Never report unrun tests or unverified browser behavior as passing.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.