Motion Canvas Video

Creative skill, available on Zeplik

Motion Canvas Video is a ready-to-run creative skill on Zeplik. Programmatic videos with Motion Canvas in TypeScript: scene code plus working project config with the ESM/CommonJS setup workaround. Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer. It returns a structured code you can keep and reuse: Motion Canvas scene .tsx plus project.ts/vite.config.js setup files.

The Motion Canvas Video skill loads automatically when your request matches it, or you can invoke it directly by typing /motion-canvas in any chat. It works with attachments, connectors, and any model that supports the task, so you get the same expert method every time without setting anything up.

What the Motion Canvas Video skill can do

Try these prompts on Zeplik

Pick a prompt to open it in the Zeplik app. If you are not signed in yet, your prompt is waiting for you the moment you do.

How the Motion Canvas Video skill works

Motion Canvas — Production-Ready Video Creation with TypeScript

Create programmatic videos with Motion Canvas: TypeScript animations built from generator functions and reactive signals, previewed live via Vite. Includes the critical ESM/CommonJS setup workaround.

CRITICAL: ESM/CommonJS Interop

@motion-canvas/vite-plugin is distributed as CommonJS, so the plain import motionCanvas from '@motion-canvas/vite-plugin' will not work in ESM projects (throws TypeError: motionCanvas is not a function). You must load it with createRequire (shown below).

Core Concepts

  • Generator functions: describe animations with function* and yield* — each yield* awaits a tween.
  • Signals: reactive values that auto-update dependent properties.
  • Real-time preview: live Vite-powered editor for instant feedback.
  • Canvas API + TypeScript-first: high-performance 2D vector rendering, fully typed.
  • Audio sync: align animations precisely with voice-overs.

Setup

1. Init & enable ESMnpm init -y, then in package.json set "type": "module" and scripts { "dev": "vite", "build": "vite build" }.

2. Install ALL deps (omitting @motion-canvas/ui makes the plugin fail):

npm i -D @motion-canvas/core @motion-canvas/2d @motion-canvas/vite-plugin @motion-canvas/ui vite typescript

3. vite.config.js (use .js, NOT .ts — config runs before TS compilation, and the require workaround is reliable in plain JS):

import {defineConfig} from 'vite';
import {createRequire} from 'module';

// WORKAROUND: @motion-canvas/vite-plugin is CommonJS
const require = createRequire(import.meta.url);
const mod = require('@motion-canvas/vite-plugin');
const motionCanvas = mod.default || mod;

export default defineConfig({
  plugins: [motionCanvas({project: './src/project.ts'})],
});

4. tsconfig.json — must include esModuleInterop and allowSyntheticDefaultImports, and JSX from Motion Canvas:

{
  "compilerOptions": {
    "target": "ES2020", "module": "ES2020", "lib": ["ES2020", "DOM"],
    "jsx": "react-jsx", "jsxImportSource": "@motion-canvas/2d/lib",
    "moduleResolution": "node", "esModuleInterop": true,
    "allowSyntheticDefaultImports": true, "strict": true, "skipLibCheck": true,
    "resolveJsonModule": true, "isolatedModules": true, "noEmit": true
  },
  "include": ["src/**/*"], "exclude": ["node_modules"]
}

5. index.html — a <div id="root"> and <script type="module" src="/src/project.ts">.

6. src/project.ts:

import {makeProject} from '@motion-canvas/core';
import example from './scenes/example?scene'; // note the ?scene suffix
export default makeProject({scenes: [example]});

7. First scene src/scenes/example.tsx:

import {makeScene2D} from '@motion-canvas/2d/lib/scenes';
import {Circle} from '@motion-canvas/2d/lib/components';
import {createRef} from '@motion-canvas/core/lib/utils';
import {all} from '@motion-canvas/core/lib/flow';

export default makeScene2D(function* (view) {
  const circle = createRef<Circle>();
  view.add(<Circle ref={circle} size={70} fill="#e13238" />);

  yield* circle().size(140, 1);            // tween size over 1s
  yield* circle().position.x(300, 1);
  yield* all(                               // parallel tweens
    circle().scale(1.5, 0.5),
    circle().rotation(360, 1),
  );
});

8. Runnpm run dev, open http://localhost:5173.

Best Practices

  1. Always use the createRequire workaround for the Vite plugin.
  2. Use vite.config.js, not .ts.
  3. Install @motion-canvas/ui — the plugin needs it.
  4. Write all scene animation as function* / yield*.
  5. Use signals for reactive property dependencies; use refs (createRef) for precise control.
  6. Second tween arg is duration in seconds; use all() for parallel, sequence()/plain yield* for serial.
  7. Preview frequently; split complex work into multiple scenes.

Troubleshooting

  • motionCanvas is not a function → missing createRequire workaround.
  • Cannot find module '@motion-canvas/ui' → install the UI package.
  • Property 'default' does not exist ... → add esModuleInterop/allowSyntheticDefaultImports to tsconfig.
  • Failed to resolve import "*.tsx?scene" → check the ?scene suffix and the plugin's project path.
  • CJS build of Vite's Node API is deprecated → harmless warning from the CommonJS plugin; ignore.

Output

Return the scene .tsx plus the project config files (project.ts, vite.config.js, tsconfig.json, package.json with "type": "module") so the animation runs out of the box. Full API details: https://motioncanvas.io/docs.

How to use the Motion Canvas Video skill

  1. Sign in to Zeplik

    Create a free Zeplik account or sign in. New accounts start with free credits, so you can try the Motion Canvas Video skill right away.

  2. Describe your creative task

    Ask in plain language, or type /motion-canvas to invoke the skill directly. Zeplik recognizes the Motion Canvas Video skill and applies its method.

  3. Review and refine the result

    Zeplik returns a structured code you can edit, download, and reuse. Ask follow-ups to refine it.

Source and credit

Author
davila7 community
License
MIT

Adapted from the open-source davila7/claude-code-templates project and tuned to run natively on Zeplik. View source on GitHub.

Frequently asked questions

What is the Motion Canvas Video skill?
Motion Canvas Video is a ready-to-run creative skill on Zeplik. Programmatic videos with Motion Canvas in TypeScript: scene code plus working project config with the ESM/CommonJS setup workaround. Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer. It returns a structured code you can keep and reuse: Motion Canvas scene .tsx plus project.ts/vite.config.js setup files.
How do I use Motion Canvas Video on Zeplik?
Sign in to Zeplik and ask in plain language, or type /motion-canvas in any chat to invoke it directly. The skill applies its method and returns a result you can refine in the same conversation.
Which AI model does the Motion Canvas Video skill use?
Any model you choose. Zeplik works across every model in one chat, so the Motion Canvas Video skill runs on your preferred model for the task.
Where does the Motion Canvas Video skill come from?
The Motion Canvas Video skill is adapted from the open-source davila7/claude-code-templates project (MIT) and tuned to run natively on Zeplik. The original source is linked on this page.
How much does the Motion Canvas Video skill cost?
Using the skill is free to start. You only spend Zeplik credits when the assistant runs, and new accounts begin with free credits.

Related creative skills

More on Zeplik

Try Motion Canvas Video on Zeplik

Every model, one chat. Bring the Motion Canvas Video skill into your next conversation and let the assistant do the work.

Browse all skills
Motion Canvas Video - Creative skill for Zeplik AI | Zeplik Chat