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
- Scaffold a full Motion Canvas project with working vite.config.js and tsconfig.json
- Apply the createRequire workaround fixing ESM/CommonJS plugin errors
- Write scene animations using generator functions, yield tweens and signals
- Diagnose common setup errors like missing ui package or scene suffix issues
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*andyield*— eachyield*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 ESM — npm 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. Run — npm run dev, open http://localhost:5173.
Best Practices
- Always use the
createRequireworkaround for the Vite plugin. - Use
vite.config.js, not.ts. - Install
@motion-canvas/ui— the plugin needs it. - Write all scene animation as
function*/yield*. - Use signals for reactive property dependencies; use refs (
createRef) for precise control. - Second tween arg is duration in seconds; use
all()for parallel,sequence()/plainyield*for serial. - Preview frequently; split complex work into multiple scenes.
Troubleshooting
motionCanvas is not a function→ missingcreateRequireworkaround.Cannot find module '@motion-canvas/ui'→ install the UI package.Property 'default' does not exist ...→ addesModuleInterop/allowSyntheticDefaultImportsto tsconfig.Failed to resolve import "*.tsx?scene"→ check the?scenesuffix and the plugin'sprojectpath.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
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.
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.
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
- 3D Web ExperiencesUse when building 3D on the web: Three.js, React Three Fiber, WebGL, Spline, scroll-driven 3D scenes. Not for 2D browser games (use develop-web-game) or non-3D artifacts (use web-artifacts-builder).
- AI Image GenerationWrite high-quality prompts for Black Forest Labs FLUX image models, covering text-to-image, image editing instructions, structured JSON scene prompts, exact hex colors, text rendering, and multi-reference composition. Use when the user is generating or editing images with FLUX or asks for an image generation prompt and names FLUX or BFL. Not for diagram or chart requests, and not general prompt engineering for language models.
- Algorithmic Art StudioUse when the user asks for generative or algorithmic art made with code — p5.js sketches, flow fields, particle systems, seeded randomness with interactive parameter exploration. Trigger: "generative art", "creative coding", "make art with code". Not for photorealistic image generation (use flux-imaging).
- Game Development StudioUse when designing or building games in engines like Unity, Godot, or Unreal -- mechanics, GDScript, ECS/DOTS, game systems, performance. Not for browser games built in chat (use develop-web-game).
- Image EnhancerUse when the user uploads an image to improve -- sharpness, clarity, lighting, composition, artifacts -- via analysis plus a regeneration prompt. Not for new images from scratch (use imagegen).
- Image Generation StudioUse to help CRAFT and refine an image prompt (composition, style, lighting, negative space, targeted revisions). You do NOT generate images from this skill -- Zeplik's native image pipeline handles generation automatically. Prompt-craft guidance only.
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.