ask-animation

Implements UI transitions, springs, scroll animations, and gestures using motion.dev and GSAP.

1|Updated Aug 17, 2026
One-click install
npx skills add https://github.com/NalinDalal/skillset --skill ask-animation-nalindalal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ask-animation
Source: https://github.com/NalinDalal/skillset/tree/main/skills/ui/ask-animation
Command: npx skills add https://github.com/NalinDalal/skillset --skill ask-animation-nalindalal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing and implementing the right animation pattern for UI interactions is error-prone: developers often animate layout properties, skip exit animations, ignore reduced-motion preferences, or pick the wrong library for the job. This Skill provides a decision framework and ready-to-use code patterns for every common motion scenario. ## Core Features & Use Cases - Animation Pattern Guide: Maps animation types (page transitions, layout, enter/exit, scroll-linked, drag, hover/tap, morphing, stagger) to the right library and key principles. - Quality Checklist & Anti-Patterns: Enforces rules like transform/opacity-only animation, spring curves, 200ms timing, exit animations, and prefers-reduced-motion support. - Library Routing: Recommends motion.dev for standard work and escalates to GSAP + ScrollTrigger + Lenis for showcase-tier (dial 3) experiences. - Use Case: When asked to add a page transition or button press feedback, the Skill supplies tuned motion.dev code with spring presets, AnimatePresence usage, and layoutId shared-element transitions. ## Quick Start Ask the agent to add animations or transitions to a component, such as adding a spring-based page transition and hover feedback to a React page.

Frequently Asked Questions about ask-animation

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

FAQPage Schema
How do I add page transitions in React with motion.dev?▼

Wrap routes in AnimatePresence with mode="wait" and animate a motion.div keyed by pathname with opacity and y transforms. Use a spring transition like stiffness 500, damping 30 for a roughly 200ms enter.

motion.dev vs GSAP: which should I use for scroll animations?▼

Use motion.dev for standard UI motion like transitions, layout, and gestures. Choose GSAP with ScrollTrigger and Lenis for showcase-tier scroll work requiring scrub, pin, and snap behaviors.

How do I animate elements entering and exiting the DOM?▼

Use AnimatePresence from motion.dev around conditional elements and define initial, animate, and exit props. A common pattern is scale 0.97 to 1 with a fade, ensuring the exit animation runs before removal.

Does motion.dev support reduced motion accessibility?▼

Yes, you must respect prefers-reduced-motion: reduce by making animations instant and disabling springs. Skipping reduced-motion support is listed as an accessibility failure in the quality checklist.

Why should I avoid animating width and height in CSS transitions?▼

Animating layout properties like width, height, top, and left triggers expensive layout recalculations and causes jank. Animate only transform and opacity, and avoid transition: all which lazily animates everything.