dd-smooth-transitions

Prescribe React and Framer Motion animation ownership for keyed UI transitions.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/moonwell-fi/moonwell-ai --skill dd-smooth-transitions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dd-smooth-transitions
Source: https://github.com/moonwell-fi/moonwell-ai/tree/main/.claude/skills/dd-smooth-transitions
Command: npx skills add https://github.com/moonwell-fi/moonwell-ai --skill dd-smooth-transitions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents janky, delayed, and visually glitchy animations caused by overlapping layers, poor animation ownership, and brittle cleanup behavior.

Core Features & Use Cases

  • Animate the correct element: Move animations to the inner container that owns the changing layout or content so parents resize naturally.
  • Manage overlap gracefully: Keep transitions immediate, add small exit blur, and use subtle scale reduction to soften brief collisions.
  • Stabilize dynamic text and icon swaps: Key enter/exit states explicitly so stale labels clear quickly without lag.
  • Use responsive motion rules: Ensure responsiveness starts immediately while cleanup is orchestrated rather than delayed.

Use Case: You’re building a React + Framer Motion status toggle where the label and icon swap; you want crisp crossfades without overlapping artifacts, drifting alignment, or “waiting for one layer to disappear” behavior.

Quick Start

Ask the assistant to propose a Framer Motion pattern for a label-and-icon toggle that keeps responsiveness immediate, animates only the content-owning element, and uses keyed AnimatePresence enter/exit with small blur plus subtle scale during overlaps.

Frequently Asked Questions about dd-smooth-transitions

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

FAQPage Schema
How do I fix janky UI transitions when swapping text and icons in React?

Fix janky UI transitions by animating the inner content-owning element rather than the parent container, ensuring parents resize naturally without causing layout drift. Use keyed enter and exit behavior in Framer Motion so stale labels clear immediately during dynamic text and icon swaps.

Why does my Framer Motion crossfade leave overlapping visual artifacts during layout changes?

Overlapping artifacts in Framer Motion crossfades occur when cleanup is delayed or animation ownership is poorly managed. Resolve this by keeping transitions immediate, applying a small exit blur to soften brief collisions, and using subtle scale reduction instead of scaling elements to zero.

What is the best way to handle dynamic label enter and exit animations without lag?

Handle dynamic label animations without lag by explicitly keying enter and exit states within AnimatePresence. This keyed transition approach forces stale content to clear instantly, preventing overlapping layers and ensuring responsive motion during interactive component state changes.

Can I use AnimatePresence to prevent stale content lag in crossfade components?

Yes, AnimatePresence prevents stale content lag by requiring explicit keys for enter and exit states. This ensures dynamic text and icons clear quickly during crossfades, while animating the content-owning element keeps the layout responsive and avoids delayed cleanup behavior.

When should I use scale reduction instead of scale-to-zero for exit animations in Framer Motion?

Use subtle scale reduction instead of scale-to-zero when you need to soften brief visual collisions during overlapping layout changes. A small exit blur combined with subtle scale reduction gracefully manages overlap cleanup without causing abrupt disappearance or delayed responsiveness.