PACKAGE · ANIMATION

@formkit/auto-animate

Add motion to your apps with a single line of code.

WEEKLY DOWNLOADS 2.6M
STARS 14.0K
FORKS 270
OPEN ISSUES 2
GZIP SIZE 4.3 kB
UNPACKED SIZE 74.4 kB
DEPENDENCIES 1
LAST UPDATED 1y ago
DOWNLOAD TRENDS

@formkit/auto-animate downloads · last 12 months

Download trends for @formkit/auto-animate1 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.02.0M4.0M6.0M8.0MNov 2025FebMayAugOct 2026
@formkit/auto-animate
ABOUT @FORMKIT/AUTO-ANIMATE

@formkit/auto-animate adds motion to user-interface changes with a single line of code. It targets a common interface problem: elements appearing, disappearing, or changing position can otherwise update abruptly, making dynamic lists and layouts harder to follow.

The package is designed to add animation without requiring developers to build a timeline for each interface change. Its stated focus is JavaScript and UI animation, with React and Vue among its topics, making it relevant to developers who want motion attached to existing interface structure rather than a separate animation system.

The main API pattern is to attach AutoAnimate to a parent element so changes among its child elements can be animated. In React, this is commonly expressed through the package’s `useAutoAnimate` hook; JavaScript integrations can use the `autoAnimate` function with a parent element. The approach centers on animating structural changes instead of describing every transition individually.

AutoAnimate fits workflows where interface contents change in response to user actions or application state, particularly lists and other collections of child elements. Its React and Vue ecosystem focus makes it useful to evaluate alongside those frameworks, while the JavaScript API provides a direct integration pattern for interfaces not organized around a framework-specific hook.

The package is version 0.11.0, is licensed under MIT, and has a reported gzip bundle size of 4.3 kB and unpacked size of 74.4 kB. Reported project signals include 2.6M weekly downloads, 14.0K GitHub stars, 269 forks, and 3 open issues; these figures provide context but do not guarantee suitability for a particular application.

AutoAnimate is intended for motion caused by changes to element structure and position, not as a complete system for choreographed scenes or finely controlled, bespoke timelines. Check whether its automatic behavior matches the required interaction, and use explicit animation logic when transitions need precise sequencing or per-element control.

WHEN TO USE
  • When a list gains or loses items, attach `autoAnimate` to its parent so child insertions and removals receive motion.
  • When building a React interface, use the `useAutoAnimate` hook to connect animation behavior to a parent element that contains changing children.
  • When a Vue view updates a collection, evaluate AutoAnimate for animating the resulting child-element changes without defining each transition separately.
  • When items reorder after filtering or sorting, use the parent-based pattern to make changes in child positions easier to follow.
  • When a state change conditionally renders child elements, apply AutoAnimate to their shared parent to animate the structural update.
  • When adding motion to an existing JavaScript interface, use the `autoAnimate` function with the relevant parent element.
  • When evaluating a lightweight animation addition, compare the reported 4.3 kB gzip bundle size against the motion behavior your interface needs.
WHEN NOT TO USE
  • If an animation requires exact sequencing across multiple elements, use explicit animation logic that defines the timeline rather than relying on AutoAnimate’s parent-and-children pattern.
  • If each element needs a distinctly authored transition, use a solution with per-element animation control instead of applying automatic behavior to a shared parent.
  • If motion must be driven by an animation timeline rather than DOM child changes, choose an animation approach designed around explicit timelines.
  • If the interface changes do not involve child elements appearing, disappearing, or moving under a parent, use an animation method suited to the specific property or interaction instead.
  • If AutoAnimate’s automatic transitions do not match the required visual behavior, implement the transition explicitly so its behavior can be controlled directly.
  • If the application does not use a suitable parent element to contain changing children, restructure the integration or use an animation approach that does not depend on that pattern.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 4
@formkit/auto-animate vs animejs ★ 75.1K · 1.2M/wk @formkit/auto-animate vs gsap ★ 31.3K · 8.3M/wk @formkit/auto-animate vs motion ★ 35.6K · 39.6M/wk @formkit/auto-animate vs framer-motion ★ 35.6K · 72.8M/wk