animate

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

70|4|Updated Jul 22, 2025
One-click install
npx skills add https://github.com/AlexW00/Zettel --skill animate-alexw00
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: animate
Source: https://github.com/AlexW00/Zettel/tree/main/.agents/skills/animate
Command: npx skills add https://github.com/AlexW00/Zettel --skill animate-alexw00

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Deciding whether an element should animate, which tool to use, and which easing, duration, and properties to apply is error-prone, often producing sluggish or jarring motion. This Skill turns a motion request into a reviewed implementation by walking a fixed decision sequence before writing any code. ## Core Features & Use Cases - Gated build sequence: Decides first whether something should animate at all based on interaction frequency, then names its purpose before choosing tools, properties, curves, and durations. - Concrete implementation rules: Enforces transform/opacity-only animation, strong custom cubic-bezier curves, sub-300ms UI durations, spring configs for gestures, and mandatory reduced-motion and hover gating. - Ready-made recipes: Ships implementations for button presses, dropdowns, tooltips, modals, drawers, toasts, accordions, staggers, hold-to-confirm, tab indicators, scroll reveals, and drag-to-dismiss. - Use Case: Ask it to animate a dropdown menu, and it returns CSS using transform-origin anchored to the trigger, a 200ms strong ease-out curve, opacity plus scale(0.95) entry, and the matching prefers-reduced-motion fallback. ## Quick Start Ask the assistant to animate a component, for example: add an entrance and exit animation to my dropdown menu built with Base UI.

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?▼

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

CSS transitions vs Motion library for animations?▼

Use CSS transitions for hovers, presses, and state toggles, and CSS animations for predetermined motion that must stay smooth under load. Reach for Motion only when you need springs, layout animations, exit animations, or gesture-driven values.

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. Frequent interactions should use instant state changes, since even fast animation adds perceived latency at that frequency.

Why does my animation drop frames under load?▼

Frame drops come from animating layout properties like width, height, or top instead of transform and opacity, or from using Motion's x/y/scale shorthand props. Use the full transform string and GPU-composited properties to stay off the main thread.

How do I handle prefers-reduced-motion in animations?▼

Wrap motion in a prefers-reduced-motion media query that keeps opacity and color transitions but removes transform-based movement. Reduced motion means fewer and gentler animations, not zero, so comprehension aids still work.

How do I implement drag to dismiss with springs?▼

Track drag distance and velocity, dismissing on a threshold or flick velocity above roughly 0.11, and set transform directly on the dragged element. Settle with a spring config like duration 0.5 and bounce 0.2 so interrupted drags keep their velocity.