auto-animate

Solid

AutoAnimate (@formkit/auto-animate) zero-config animations for React. Use for list transitions, accordions, toasts, or encountering SSR errors, animation libraries complexity.

Web & Frontend 251 stars 36 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 92/100

Stars 20%
80
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# AutoAnimate **Status**: Production Ready ✅ **Last Updated**: 2026-08-03 **Dependencies**: None (works with any React setup) **Latest Versions**: @formkit/auto-animate@0.10.0 --- ## Quick Start (2 Minutes) ### 1. Install AutoAnimate ```bash bun add @formkit/auto-animate ``` **Why this matters:** - Only 3.28 KB gzipped (vs 22 KB for Motion) - Zero dependencies - Framework-agnostic (React, Vue, Svelte, vanilla JS) ### 2. Add to Your Component ```tsx import { useAutoAnimate } from "@formkit/auto-animate/react"; export function MyList() { const [parent] = useAutoAnimate(); // 1. Get ref return ( <ul ref={parent}> {/* 2. Attach to parent */} {items.map(item => ( <li key={item.id}>{item.text}</li> {/* 3. That's it! */} ))} </ul> ); } ``` **CRITICAL:** - ✅ Always use unique, stable keys for list items - ✅ Parent element must always be rendered (not conditional) - ✅ AutoAnimate respects `prefers-reduced-motion` automatically - ✅ Works on add, remove, AND reorder operations ### 3. Use in Production (SSR-Safe) For Cloudflare Workers or Next.js: ```tsx // Use client-only import to prevent SSR errors import { useState, useEffect } from "react"; export function useAutoAnimateSafe<T extends HTMLElement>() { const [parent, setParent] = useState<T | null>(null); useEffect(() => { if (typeof window !== "undefined" && parent) { import("@formkit/auto-animate").then(({ default: autoAnimate }) => { autoAnimate(parent); ...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
1 years ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category