motion Documentation

A modern animation library for React and JavaScript

33,201 stars TypeScript TypeScript 1 file ยท ~893 tokens #animation#animation-js#motion#react#reactanimations#spring
RAW Doc

Motion

An open source animation libraryfor JavaScript, React and Vue

bash
# React / JavaScript
npm install motion

# Vue
npm install motion-v

Table of Contents

  1. Why Motion?
  2. ๐Ÿฆ Platforms
  3. ๐ŸŽ“ Examples
  4. โšก๏ธ Motion+
  5. ๐Ÿ‘ฉ๐Ÿปโ€โš–๏ธ License
  6. ๐Ÿ’Ž Contribute
  7. โœจ Sponsors

Why Motion?

  • Simple API: First-class React, JavaScript, and Vue packages.
  • Hybrid engine: Power of JavaScript combined with native browser APIs for 120fps, GPU-accelerated animations.
  • Production-ready: TypeScript, extensive test suite, tree-shakable, tiny footprint.
    Batteries included: Gestures, springs, layout transitions, scroll-linked effects, timelines.

๐Ÿฆ Platforms

Motion is available for React, JavaScript and Vue.

React

jsx
import { motion } from "motion/react"

function Component() {
    return <motion.div animate={{ x: 100 }} />
}

Get started with Motion for React.

Note: Framer Motion is now Motion. Import from motion/react instead of framer-motion.

JS

javascript
import { animate } from "motion"

animate("#box", { x: 100 })

Get started with JavaScript.

Vue

html
<script>
    import { motion } from "motion-v"
</script>

<template> <motion.div :animate={{ x: 100 }} /> </template>

Get started with Motion for Vue.

๐ŸŽ“ Examples & tutorials

Browse 330+ official examples, with copy-paste code that'll level-up your animations whether you're a beginner or an expert.

Over 100 examples come with a full step-by-step tutorial.

โšก๏ธ Motion+

A one-time payment, lifetime-updates membership:

  • 330+ examples
  • 100+ tutorials
  • Premium APIs like Cursor and Ticker
  • Transition editor for Cursor and VS Code
  • AI skills
  • Private Discord
  • Early access content

Get Motion+

๐Ÿ‘ฉ๐Ÿปโ€โš–๏ธ License

  • Motion is MIT licensed.

๐Ÿ’Ž Contribute

โœจ Sponsors

Motion is sustainable thanks to the kind support of its sponsors.

Become a sponsor

Partners

Motion powers the animations for all websites built with Framer, the web builder for creative pros. The Motion website itself is built on Framer, for its delightful canvas-based editing and powerful CMS features.

Motion drives the animations on the Cursor homepage, and is working with Cursor to bring powerful AI workflows to the Motion examples and docs.

Platinum

Gold

Silver

Personal sponsors