Motion

A hybrid JavaScript and React animation library built for 120fps gestures, springs, and layout transitions.

Library
npm
v13.4.4
33,759 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
79 /100 Good
Development Activity 100
Maintenance 52
Community 64
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
88 /100 Excellent
Architecture 90
Code Quality 85
Innovation 90
Learning Curve 78

Motion (formerly Framer Motion) is an open-source animation library for JavaScript, React, and Vue that combines a hardware-accelerated Web Animations API engine with a JavaScript-powered spring engine to deliver smooth, gesture-driven interfaces without sacrificing bundle size.

Import { motion } from motion/react and existing HTML elements become animatable components with declarative variants, drag, hover, and tap gestures, while the underlying motion-dom and motion-utils packages expose the same primitives to non-React JavaScript projects and the community-maintained Vue port. Shared-layout and scroll-linked animations reuse a FLIP-style projection engine, and split entry points (mini, dom, react-mini) let teams opt into a WAAPI-only build when the full spring engine isn’t needed.

What You Get

  • Declarative motion and lightweight m components that turn any HTML/SVG element into an animatable one via animate, variants, whileHover, whileTap, and drag props.
  • An imperative animate() function and motion-dom primitives for animating outside React, including scroll-linked (scroll) and viewport (inView) triggers.
  • A hybrid engine that automatically chooses between the native Web Animations API and a JS-powered spring engine for hardware-accelerated performance.
  • Shared-layout (layout, LayoutGroup) and FLIP-style projection for animating position/size changes between renders without manual measurement code.
  • Tree-shakable feature bundles (domAnimation, domMax, domMin, mini, react-mini) so apps only ship the animation capabilities they actually use.

Common Use Cases

  • Animating page and modal transitions with AnimatePresence when React components mount and unmount.
  • Building drag-to-reorder lists and Kanban boards with the built-in Reorder component and drag gesture primitives.
  • Adding scroll-linked parallax and reveal-on-scroll effects to marketing and landing pages via useScroll and scroll.
  • Powering shared-element/layout transitions between route or state changes without hand-written FLIP measurement code.

Under The Hood

Architecture The motion package (packages/motion) is a thin re-export shim whose index.ts does export * from "framer-motion/dom", with parallel entry points (dom.ts, mini.ts, react.ts, react-client.ts) mapped to the motion/react-style subpath imports documented in the README. The actual engine lives in framer-motion: packages/framer-motion/src/dom.ts re-exports motion-dom and motion-utils and adds animate, scroll, and inView, while packages/framer-motion/src/index.ts layers on the full React API — the motion and m component proxies (render/components/motion/proxy, render/components/m/proxy), AnimatePresence, LayoutGroup, MotionConfig, Reorder, and motion-value hooks (useMotionValue, useTransform, useSpring, useScroll). Layout/projection logic sits in packages/framer-motion/src/projection and motion-dom/src/projection + motion-dom/src/layout for FLIP-style shared-layout animation. Two animation engines coexist in motion-dom/src/animation — a JS spring/keyframe engine and a native WAAPI engine (animators/waapi) — selected per feature bundle (domAnimation/domMax/domMin in framer-motion/src/render/dom/features-*) so unused capability tree-shakes away. Props flow from the motion/m proxies through VisualState/ScrapeMotionValuesFromProps (render/types.ts) into MotionValues (motion-dom/src/value), which the render/animation pipeline writes to the DOM either via WAAPI or a rAF-driven frameloop (motion-dom/src/frameloop).

Tech Stack TypeScript-first (72.76% of the codebase), managed as a Yarn-workspaces monorepo built with Turborepo (turbo.json) and versioned with Lerna (lerna.json), split into four publishable packages: framer-motion (full React feature set), motion (thin re-export under the current brand), motion-dom (DOM-level animation/gesture/projection/scroll primitives), and motion-utils (dependency-free helpers — clamp, easing, pipe, memoization, error formatting). Peer dependencies are react/react-dom ^18.0.0 || ^19.0.0 plus an optional @emotion/is-prop-valid for prop filtering. The build uses Rollup with Terser minification; tests run on Jest with @testing-library/react, complemented by Playwright and Cypress e2e/visual suites exercised against example harnesses in dev/html, dev/react, dev/next, and dev/react-19. ESLint is extended with eslint-plugin-react-compiler and eslint-plugin-redos-detector to enforce React 19 compiler compatibility and regex-DoS safety.

Code Quality The repo carries 97 colocated test files under framer-motion/src (__tests__ directories alongside animation/, motion/, hooks/) and 66 under motion-dom/src, plus a dedicated __tests__ suite for motion-utils’ pure functions — thorough unit coverage rather than a thin smoke-test layer. Errors route through centralized helpers (motion-utils/src/format-error-message.ts, errors.ts, warn-once.ts) for consistent, de-duplicated dev-mode diagnostics instead of ad hoc throws. Every public export ships a .d.ts via each package’s exports map types condition, and internal modules type MotionValue, ScrapeMotionValuesFromProps, and VisualState explicitly. Naming is consistent (use-* hook files, PascalCase components, kebab-case utilities) and packages are marked "sideEffects": false for correct tree-shaking.

API Design End users mostly just run npm install motion and import { motion } from "motion/react" — one subpath import covers both the JS animate() API and the React component API, with mini/react-mini variants offering smaller bundles when only WAAPI-backed features are needed. The declarative <motion.div animate={{ x: 100 }} /> requires zero boilerplate compared to manually wiring an imperative animation loop, and prop-driven gestures (whileHover, whileTap, drag) read as native HTML props. In-repo documentation is comparatively thin (a ~140-line top-level README plus similarly sized per-package READMEs); the bulk of onboarding material — 330+ examples and 100+ tutorials — lives on the external motion.dev site rather than in the repository itself.

Used by 172 apps in this directory

Python
76%
Apache 2.0

Second Me

AI Assistants · Productivity

15,690

Train a locally hosted AI twin on your own memories—then connect it to the world through a decentralized identity network.

View details
41
Repo Health
75
Technical
67
Dependency
Built with
Python 76%
TypeScript 19%
Updated 1 years ago
Python
57%
Other

Sentry

Analytics · Developer Tools · Monitoring

44,862

Developer-first error tracking and performance monitoring platform with AI-powered root-cause analysis across 20+ languages and frameworks.

View details
95
Repo Health
80
Technical
69
Dependency
Built with
Python 57%
TypeScript 41%
Updated 1 weeks ago
Python
64%
AGPL 3.0

Shadowbroker

Analytics · Monitoring · Security

11,261

Self-hosted OSINT dashboard that fuses 60+ live intelligence feeds — flight tracking, ship AIS, satellites, CCTV, seismic and radio networks — into one real-time map, with an agent-ready command channel for AI co-analysts.

View details
84
Repo Health
83
Technical
71
Dependency
Built with
Python 64%
TypeScript 32%
Updated 2 weeks ago
TypeScript
95%
MIT

sigle

Blogging

489

A decentralized, open-source writing platform that permanently stores your stories on the Stacks blockchain and Arweave — where Web3 content creators own their words forever.

View details
81
Repo Health
78
Technical
69
Dependency
Built with
TypeScript 95%
Updated 1 weeks ago
TypeScript
50%
Other

SigNoz

Analytics · Monitoring

32,224

Self-host your entire observability stack — logs, metrics, traces, and LLM monitoring — in one OpenTelemetry-native platform, without the Datadog bill.

View details
92
Repo Health
83
Technical
67
Dependency
Built with
TypeScript 50%
Go 38%
Updated 1 weeks ago
Python
88%
Apache 2.0

sirchmunk

AI Development · Data Engineering

1,351

Drop your files and search them instantly — no vector DB, no indexing pipeline, just raw data queried by a self-evolving intelligence layer.

View details
84
Repo Health
70
Technical
72
Dependency
Built with
Python 88%
TypeScript 11%
Updated 2 weeks ago
TypeScript
97%
Other

Sourcebot

AI Code Assistants · Developer Tools · Search

3,952

A self-hosted, AI-powered code search engine that indexes every repo across GitHub, GitLab, Bitbucket, Gitea, Gerrit, and Azure DevOps, so both engineers and coding agents can search, browse, and ask questions about your codebase from one place.

View details
85
Repo Health
83
Technical
62
Dependency
Built with
TypeScript 97%
Updated 2 weeks ago
Rust
77%
AGPL 3.0

Spacedrive

Collaboration · File Storage

39,041

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
56
Repo Health
84
Technical
63
Dependency
Built with
Rust 77%
TypeScript 20%
Updated 2 months ago
TypeScript
89%
Other

Hexclave

Authentication · Developer Tools

6,862

The open-source user infrastructure platform — authentication, teams, payments, emails, analytics, and more on a single unified user model.

View details
87
Repo Health
80
Technical
66
Dependency
Built with
TypeScript 89%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers