AU

Auto Animate

@formkit/auto-animate

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

Animation
animation
transition
react
preact
vue
angular
svelte
solid
marko
@formkit/auto-animate
Stars
370
Weekly
1.3M
Open issues
5
Bundle
~25 kB

Installation

npm install @formkit/auto-animate

Code example

import { motion } from "@formkit/auto-animate";

export function Example() {
  return (
    <motion.div
      initial={{ opacity: 0, y: 12 }}
      animate={{ opacity: 1, y: 0 }}
      transition={{ duration: 0.35 }}
    >
      <h2>Animated with Auto Animate</h2>
    </motion.div>
  );
}

Pros & cons

Pros

  • Actively maintained by Justin Schroeder
  • 1.3M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 5 open issues on GitHub

FAQs

Alternatives & similar libraries