explaingit

motiondivision/motion

📈 Trending31,992TypeScriptAudience · developerComplexity · 2/5ActiveLicenseSetup · easy

TLDR

Open-source animation library for JavaScript, React, and Vue that makes smooth, production-quality animations easy without manual keyframe calculations.

Mindmap

mindmap
  root((Motion))
    What it does
      Smooth animations
      Scroll-linked effects
      Spring physics
      Layout transitions
    How to use
      React components
      Vanilla JavaScript
      Vue integration
      CSS selectors
    Features
      Gesture support
      Timeline sequencing
      GPU acceleration
      120fps performance
    Use cases
      Marketing sites
      Animated dashboards
      Mobile navigation
      Interactive UI

Things people build with this

USE CASE 1

Build marketing websites with scroll-triggered animations and smooth element reveals.

USE CASE 2

Create animated dashboards with charts and data visualizations that transition smoothly.

USE CASE 3

Add mobile-style navigation with polished enter and exit animations to web apps.

USE CASE 4

Implement spring-based interactions and gesture-driven animations for interactive interfaces.

Tech stack

TypeScriptJavaScriptReactVueCSS

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

Motion is an open-source animation library for JavaScript, React, and Vue that makes it easy to add smooth, production-quality animations to web interfaces. It solves the challenge of creating complex animations, like elements sliding in on scroll, springs that mimic physical bounce, or layout changes that transition gracefully, without having to manually calculate keyframes or manage timing code. The library works by providing a simple API where you describe what you want an element to animate to rather than writing step-by-step animation code. For React, you replace a normal HTML tag with a special motion version of it and add an animate property. For plain JavaScript, you call an animate function with a CSS selector and the target values. The library then handles the timing, easing, and interpolation behind the scenes. It combines JavaScript-level control with native browser APIs and GPU-accelerated paths to achieve smooth 120fps animations. The library ships with a hybrid rendering engine, gesture support for hover and tap interactions, spring physics, scroll-linked effects where animations tie to scroll position, and timeline sequencing to coordinate multiple animations. It also supports layout animations, which automatically handle situations where elements move or resize due to DOM changes. You would use Motion when building a website or app where visual transitions and interactions matter, such as a marketing site with scroll-triggered reveals, a dashboard with animated charts, or a mobile-style navigation with smooth enter and exit animations. The tech stack is TypeScript, published as the npm package named motion. It works with React, Vue, and vanilla JavaScript, and supports modern browsers. There is also a paid Motion+ tier for premium examples, tutorials, and additional APIs.

Copy-paste prompts

Prompt 1
Show me how to add a scroll-triggered fade-in animation to elements using Motion in React.
Prompt 2
How do I create a spring physics animation that bounces when an element enters the viewport with Motion?
Prompt 3
Give me a code example of using Motion to animate layout changes when DOM elements are added or removed.
Prompt 4
How can I use Motion to coordinate multiple animations in sequence on a single page?
Prompt 5
Show me how to add hover and tap gesture animations to buttons using Motion in vanilla JavaScript.
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.