PACKAGE · ANIMATION

framer-motion

A simple and powerful JavaScript animation library

WEEKLY DOWNLOADS 34.9M
STARS 33.1K
FORKS 1.3K
OPEN ISSUES 113
INSTALL SIZE 8.4 MB
UNPACKED SIZE 4.8 MB
LAST UPDATED 5mo ago
DOWNLOAD TRENDS

framer-motion downloads — last 12 months

Download trends for framer-motion1 download series from Aug 2025 to Jul 2026. Use left and right arrow keys to inspect monthly values.043.6M87.1M130.7M174.3MAug 2025NovFebMayJul 2026
framer-motion
ABOUT FRAMER-MOTION

Framer Motion is a powerful, declarative animation library for React that simplifies the creation of complex animations in web applications. It addresses the challenge of building engaging user interfaces by providing a high-level API that abstracts away the complexities of traditional animation techniques, allowing developers to focus on the visual experience.

The library's core philosophy centers around making animation intuitive and accessible. It's designed for React developers who want to add sophisticated motion to their components without a steep learning curve, enabling seamless transitions, gestures, and animations.

Key API patterns include the `motion` component, which wraps standard HTML or SVG elements to enable animation, and hooks like `useAnimation` for imperative control and `useInView` for triggering animations based on element visibility. Developers can easily animate CSS properties, SVG paths, and even layout changes with declarative syntax.

Framer Motion integrates seamlessly with React and React Native. It fits into modern JavaScript workflows and is particularly well-suited for component-based architectures and single-page applications. Its declarative nature aligns with React's paradigm, making for a consistent development experience.

With 33.0K GitHub stars and 34.4M weekly downloads, Framer Motion is a mature and widely adopted library. Its unpacked size is 4.8 MB, which is a trade-off for its extensive feature set and ease of use. The library offers spring and decay physics animations, providing realistic motion.

A potential caveat is its size for exceptionally performance-critical applications where every kilobyte matters, or for projects that only require very basic, non-interactive animations. In such cases, lighter alternatives might be considered.

WHEN TO USE
  • When creating complex, multi-step animations and transitions within React components using the `motion` component.
  • For implementing interactive gestures like drag, pinch, and rotate without extensive manual event handling.
  • When animating based on scroll position or element visibility using the `useInView` hook.
  • For rich entrance and exit animations on component mount/unmount.
  • To achieve physics-based animations like springs and decays for more natural-feeling motion.
  • When working with SVG paths to create custom drawing or animating effects.
  • For orchestrating sequences of animations programmatically using the `useAnimation` hook.
WHEN NOT TO USE
  • If only simple CSS transitions (e.g., hover effects) are needed, using CSS alone or React's `CSSTransition` component is more performant and lightweight.
  • When targeting environments where React is not used, as Framer Motion is a React-specific library.
  • If the project requires animations not tied to the DOM or React's component lifecycle, a different animation solution might be more appropriate.
  • For extremely simple animations on static content where the overhead of a full animation library is not justified.
  • When the primary need is to animate elements outside of a React rendering context.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 4
framer-motion vs animejs ★ 71.8K · 919.6K/wk framer-motion vs @formkit/auto-animate ★ 13.9K · 989.1K/wk framer-motion vs motion ★ 33.1K · 14.5M/wk framer-motion vs gsap ★ 27.4K · 3.7M/wk