motion-and-transitions

Generates production CSS transitions and micro-animations for web UI state changes.

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/leonardoacosta/skills --skill motion-and-transitions-leonardoacosta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: motion-and-transitions
Source: https://github.com/leonardoacosta/skills/tree/main/leo-design/skills/motion-and-transitions
Command: npx skills add https://github.com/leonardoacosta/skills --skill motion-and-transitions-leonardoacosta

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve? Hand-written UI animations often feel mechanical, use wrong easing curves, ignore reduced-motion accessibility, or scale in from the wrong origin. This Skill provides nine copy-ready CSS transition patterns plus a coherent motion language so generated animations feel polished and stay accessible. ## Core Features & Use Cases - Nine canonical CSS snippets: card resize, number pop-in, notification badge, text swap, menu dropdown, modal, panel reveal, page slide, and icon swap — each with semantic CSS tokens, a t-* class namespace, and a mandatory prefers-reduced-motion guard. - Motion language and review bar: canonical cubic-bezier curves (out-quint, spring overshoot, ease-in-out), per-element duration budgets, a ten-standard review checklist, and a decision gate for whether to animate at all. - Gesture and performance references: spring physics, momentum projection, rubber-banding for draggable UI, plus jank diagnosis covering scroll-driven animation, runaway rAF loops, animated blur, and the FLIP technique. - Use Case: A user asks to make a filter modal pop out from its trigger button. The Skill selects the modal pattern, pastes the snippet, tunes --modal-open-dur, and sets data-origin from the trigger position so the scale-up grows from the correct corner. ## Quick Start Ask the agent to add a smooth open and close transition to your dropdown menu or modal using the motion-and-transitions skill.

Frequently Asked Questions about motion-and-transitions

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

FAQPage Schema
How do I add a smooth open/close transition to a dropdown menu in CSS?

Use the menu-dropdown pattern: paste the snippet, apply the t-dropdown class alongside your component class, and toggle is-open and is-closing from your click handler. Set data-origin based on the trigger's screen position so the menu scales from the correct corner.

What easing curve should I use for UI animations?

Use out-quint cubic-bezier(0.22, 1, 0.36, 1) for ambient transitions like opens, closes, and resizes, and a spring overshoot curve cubic-bezier(0.34, 1.36, 0.64, 1) only for attention moments like badge pop-ins. Never use ease-in on entrances since it delays the moment the user is watching.

How do I make CSS animations accessible for reduced motion users?

Wrap every animated rule in a @media (prefers-reduced-motion: reduce) block that cuts transitions to none or replaces movement with a short opacity cross-fade. Reduced motion means gentler animation, not zero — keep opacity and color changes that aid comprehension.

Can I use these CSS transition snippets with Tailwind?

Yes, the t-* classes coexist cleanly with Tailwind utility classes on the same element. Tailwind's built-in transition utilities cannot express custom cubic-bezier curves, so add the curve to your tailwind.config transitionTimingFunction or use the raw CSS snippets directly.

Why does my CSS animation feel janky during scroll?

Jank usually comes from animating layout properties like width or top, polling scroll events to write inline styles, or animating large blur surfaces. Animate only transform and opacity, replace scroll listeners with IntersectionObserver or animation-timeline, and use the FLIP technique for unavoidable layout changes.

When should I not animate a UI element?

Skip animation on anything triggered 100+ times per day such as keyboard shortcuts or command palettes, and on functional data the user is reading like live graphs. The decision gate rejects candidates lacking a clear purpose such as feedback, spatial consistency, or state indication.