auto-animate

Add zero-config animations to React lists, accordions, toasts, and form validation messages.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aicodepro/ai-agent-nexi --skill auto-animate-aicodepro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auto-animate
Source: https://github.com/aicodepro/ai-agent-nexi/tree/main/agent/skills/auto-animate
Command: npx skills add https://github.com/aicodepro/ai-agent-nexi --skill auto-animate-aicodepro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @formkit/auto-animate, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Adding animations to React UIs typically requires heavy libraries like Motion (22 KB) with complex configuration, and developers frequently hit SSR errors, broken table layouts, flexbox width snapping, and accessibility violations when wiring animations manually. ## Core Features & Use Cases - Zero-Config Drop-In Animations: Attach a single useAutoAnimate ref to a parent element to animate add, remove, and reorder operations in lists, accordions, toasts, and form validation messages with only 3.28 KB gzipped. - Known-Issue Prevention: Built-in guidance prevents 10+ documented pitfalls including SSR/Next.js import errors, conditional parent rendering, missing unique keys, flexbox width snapping, table-row display conflicts, and Jest/esbuild module resolution failures. - SSR-Safe Patterns: Provides dynamic-import hooks and Vite configuration for Cloudflare Workers, Next.js, Remix, Nuxt, SvelteKit, Astro, and Gatsby so animations never break server rendering. - Use Case: You are building a filterable product list in a React + Vite + Cloudflare Workers app. Use the SSR-safe hook and the filter-sort template to get smooth add/remove/sort animations without touching Motion or writing keyframes. ## Quick Start Install @formkit/auto-animate, then ask the assistant to add the useAutoAnimate ref to your list component using the react-basic template, or run the init-auto-animate.sh script for automated setup.

Frequently Asked Questions about auto-animate

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

FAQPage Schema
How do I add animations to a React list with AutoAnimate?

Install @formkit/auto-animate, call useAutoAnimate() to get a ref, and attach it to the parent element wrapping your list. Animations for add, remove, and reorder work automatically as long as items have unique, stable keys.

AutoAnimate vs Motion: which animation library should I use?

AutoAnimate (3.28 KB) handles simple list, accordion, toast, and form animations with zero config. Motion (22 KB) is needed for gestures, scroll animations, spring physics, SVG paths, and choreographed hero sections.

Does AutoAnimate work with Next.js or Cloudflare Workers SSR?

Yes, but you must import it client-side only via dynamic import inside useEffect, since it uses DOM APIs unavailable on the server. Also add @formkit/auto-animate to ssr.external in your Vite config.

Why are my AutoAnimate animations not working?

The most common causes are a conditionally rendered parent element, missing or index-based keys, and flex-grow on the animated container. Keep the parent always in the DOM, use key={item.id}, and set explicit widths.

Can AutoAnimate animate table rows?

Animating individual tr elements breaks table layout because display: table-row conflicts with animation transforms. Apply the ref to tbody instead, or switch to a div-based or CSS grid table layout.

Does AutoAnimate respect prefers-reduced-motion accessibility settings?

Yes, AutoAnimate automatically disables animations when the user has prefers-reduced-motion enabled, with no configuration required. Never set disrespectUserMotionPreference to true, as that breaks accessibility.