Guide · Open source
How to use Motion Canvas: code-driven vector animations
Updated · written with AI from the project's own documentation and checked against our catalogue data
Motion Canvas is an open-source tool for making animations in code. It has two parts: a TypeScript library that uses generator functions to describe animation steps, and an editor that previews the result in real time. This guide explains what it is good for, how to set it up from the repository, and how the editor fits into the workflow, so you can decide whether it suits your project.
Quick start
- 1Check prerequisites. Make sure Node.js and npm are installed on your machine.
- 2Clone the repository. Run git clone on the motion-canvas repository to get the monorepo locally.
- 3Install dependencies. From the monorepo root, run npm install.
- 4Build the packages. Run npx lerna run build to build all packages.
- 5Start the development editor. Run npm run template:dev to start a Vite server with the editor and the template project.
- 6Read the getting started guide. Follow the quickstart on the official docs at motion-canvas.io to create your first animation.
What Motion Canvas is and who it is for
Motion Canvas is two things: a TypeScript library that uses generators to program animations, and an editor that provides a real-time preview of those animations. It is designed to create informative vector animations and synchronize them with voice-overs.
It suits developers who are comfortable with TypeScript, creators making explainer videos with voice-overs, educators producing diagrams or math-style animations, and teams that want animations versioned in a normal code repository. It is not a good fit for people who want a drag-and-drop timeline editor with no coding, or for users who need heavy 3D or photorealistic rendering.
- Code-first: animations are written in TypeScript.
- Editor with live preview, which also lets you edit certain properties without touching code.
- Aimed at vector motion graphics rather than 3D.
Install Motion Canvas from the repository
The source describes a monorepo setup. Prerequisites are Node.js and npm. Clone the repository, install dependencies from the monorepo root, then build all packages.
The README also lists a getting started guide on the project documentation site, which is the best place to bootstrap a new project.
- Prerequisites: Node.js and npm.
- Clone the repository.
- Run npm install from the monorepo root.
- Build all packages with npx lerna run build.
git clone https://github.com/motion-canvas/motion-canvas
npm install
npx lerna run buildUnderstand the packages in the monorepo
The project is maintained as one monorepo. The packages you are most likely to touch are core, which handles running and rendering animations, 2d, the default renderer for 2D motion graphics, and ui, the editing interface. The create package bootstraps new projects, and template is a sample project for development.
The vite-plugin package is a Vite plugin used for developing and bundling animations.
- core: all logic for running and rendering animations.
- 2d: the default renderer for 2D motion graphics.
- create: bootstraps new projects.
- template: a simple project included for convenience.
- ui: the user interface used for editing.
- vite-plugin: a Vite plugin for developing and bundling animations.
Run the editor during development
To work on the editor itself, the README says to run the template development command. It starts a Vite server that watches the core, 2d, ui and vite-plugin packages. The template package contains a simple Motion Canvas project you can use while developing.
To develop the player, build the template first, then start the player development script.
npm run template:devLink a local copy of Motion Canvas into your own project
If you want to use a fork or a custom package, you can link local packages into a standalone project. Replace the version of a @motion-canvas package in your project's package.json with a file: path pointing at the package folder.
If you link the ui package, you also need to allow Vite to load external files by setting server.fs.strict to false in vite.config.ts. Then run npm install in your project.
- Replace the version in package.json with file: and a relative path.
- For the ui package, set server.fs.strict to false in vite.config.ts.
- Run npm install in the project to apply the changes.
"@motion-canvas/core": "file:../motion-canvas/packages/core"Contribute to the project
Motion Canvas is open source under the MIT licence. The README points contributors to the Contribution Guide, which explains how to help improve the project.
What people use it for
- Explainer videos with a voice-over, with animations timed to narration.
- Educational diagrams and math-style vector animations.
- Animations versioned alongside other code in a repository.
- Testing a custom fork or package by linking it into a standalone project.
Frequently asked questions
Is Motion Canvas free to use?
Yes, Motion Canvas is released under the MIT licence, as stated in the project summary. Check the LICENSE file in the repository for the full terms.
What do I need to install Motion Canvas?
The prerequisites listed are Node.js and npm. You clone the repository, run npm install from the root, and then run npx lerna run build.
Do I need to know TypeScript to use Motion Canvas?
Yes, animations are written in TypeScript, and the project is aimed at developers comfortable with it. If you want no-code editing, Motion Canvas is not the right tool.
Can I make 3D animations with Motion Canvas?
Not really. The README describes it as a tool for informative vector animations, and it is not meant for heavy 3D or photorealistic rendering.
How does Motion Canvas compare to Manim or Remotion?
Manim, Remotion, Revideo and Lottie are comparable projects in this space. Motion Canvas stands out for its TypeScript generator-based animations, a real-time editor preview, and voice-over synchronization.
Is Motion Canvas stable enough for production?
The README does not state a stability policy for its API. Check the project's current documentation and release status before relying on it for a production pipeline.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Motion Canvas suits TypeScript developers, explainer video creators and educators who want vector animations written as code and kept in a normal repository. If you want a drag-and-drop timeline, heavy 3D rendering, or a stated stable API for production, look at other options such as Manim, Remotion, Revideo or Lottie.
Install options & downloads