animate

Implements UI animations using CSS transitions, WAAPI, and Motion with defined easing and duration rules.

Updated Sep 5, 2023
One-click install
npx skills add https://github.com/eyenalxai/dotfiles --skill animate-eyenalxai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: animate
Source: https://github.com/eyenalxai/dotfiles/tree/main/.agents/skills/animate
Command: npx skills add https://github.com/eyenalxai/dotfiles --skill animate-eyenalxai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Deciding whether and how to animate a UI element is error-prone: wrong easings, sluggish durations, non-composited properties, and missing reduced-motion support make interfaces feel cheap. This Skill turns a motion request into a reviewed implementation by walking a fixed decision sequence — gate, purpose, tool, properties, curve, interruption, accessibility. ## Core Features & Use Cases - Decision-gated construction: A frequency gate rejects animation for high-frequency actions (keyboard shortcuts, 100+/day triggers) before any code is written. - Opinionated ingredient tables: Fixed easing tokens (cubic-bezier curves), duration ranges per component type, and spring configs — no approximated values. - Ready-to-build recipes: RECIPES.md covers button press, popover, tooltip, modal, drawer, toast, accordion, stagger, hold-to-confirm, tab indicator, scroll reveal, and drag-to-dismiss. - Use Case: Ask to animate a dropdown menu, and receive a transform-origin-anchored scale/opacity transition at 150–250ms with the strong ease-out curve, hover gating, and a prefers-reduced-motion variant. ## Quick Start Ask the assistant to animate a component, for example: add an entrance animation to my modal dialog.

Frequently Asked Questions about animate

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

FAQPage Schema
How do I animate a dropdown or popover in CSS?

Use a CSS transition on opacity and transform with scale(0.95) as the starting state, 150–250ms duration, and a strong ease-out curve like cubic-bezier(0.23, 1, 0.32, 1). Set transform-origin to the trigger element so the panel appears to grow out of what was clicked.

CSS transition vs Motion library for animations?

Use CSS transitions for hover, press, and state toggles; WAAPI for programmatic control without dependencies; Motion only when you need springs, layout animations, exit animations, or gesture-driven values. Pick the cheapest tool that fits the requirement.

When should a UI element not be animated?

Skip animation for actions triggered 100+ times per day, such as keyboard shortcuts or command palette toggles. Near-imperceptible motion suits tens-of-daily actions, while full animation budgets belong to occasional or first-time events like onboarding.

Why does my animation drop frames under load?

Animating width, height, margin, or top/left triggers layout and paint on every frame. In Motion, the x/y/scale shorthand props are not hardware-accelerated — use the full transform string like translateX(100px) instead, and stick to transform and opacity.

How do I support prefers-reduced-motion in animations?

Wrap motion in a @media (prefers-reduced-motion: reduce) block that keeps opacity and color transitions but drops transform-based movement. Reduced motion means fewer and gentler animations, not zero — transitions that aid comprehension should remain.

Should I use keyframes or transitions for toast notifications?

Use CSS transitions, not keyframes, for toasts and anything triggered rapidly. Transitions retarget from the current value when re-triggered, while keyframes restart from zero, causing visible jumps when a user fires the action twice quickly.