Skip to content

🎥 Make videos programmatically with React

get rid of zod requirement

Jonny Burgerdd4b86ea648b
diff --git a/bun.lock b/bun.lock
index 923e2f43f7..61090570dc 100644
--- a/bun.lock
+++ b/bun.lock
@@ -923,7 +923,7 @@
},
"dependencies": {
"@modelcontextprotocol/sdk": "1.26.0",
- "zod": "4.1.13",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
@@ -1449,7 +1449,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -1494,7 +1494,7 @@
"react-dom": "19.2.3",
"remotion": "workspace:*",
"twoslash-cdn": "0.3.1",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -1514,7 +1514,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -1533,7 +1533,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -1554,7 +1554,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -1580,7 +1580,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@eslint/eslintrc": "3.1.0",
@@ -1620,7 +1620,7 @@
"react-dom": "19.2.3",
"remotion": "workspace:*",
"tailwind-merge": "3.0.1",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@eslint/eslintrc": "3.1.0",
@@ -1660,7 +1660,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@eslint/eslintrc": "3.1.0",
@@ -1738,7 +1738,7 @@
"remotion": "workspace:*",
"tailwind-merge": "3.4.0",
"three": "0.178.0",
- "zod": "4.1.13",
+ "zod": "4.3.6",
},
"devDependencies": {
"@eslint/eslintrc": "3.1.0",
@@ -1780,7 +1780,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@elevenlabs/elevenlabs-js": "^2.20.0",
@@ -1827,7 +1827,7 @@
"tailwindcss": "4.0.0",
"vite": "5.4.21",
"vite-tsconfig-paths": "^4.2.1",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@react-router/dev": "7.12.0",
@@ -1880,7 +1880,7 @@
"remotion": "workspace:*",
"tailwind-merge": "1.14.0",
"tailwindcss-animate": "1.0.7",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -1914,7 +1914,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -1939,7 +1939,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -1960,7 +1960,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -1991,7 +1991,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -2015,7 +2015,7 @@
"react-dom": "19.2.3",
"remotion": "workspace:*",
"three": "0.178.0",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -2039,7 +2039,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/captions": "workspace:*",
@@ -2076,7 +2076,7 @@
"prettier": "3.6.0",
"tsx": "4.19.3",
"typescript": "5.9.3",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
},
"packages/template-tts-google": {
@@ -2099,7 +2099,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"remotion": "workspace:*",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@remotion/eslint-config-flat": "workspace:*",
@@ -2132,7 +2132,7 @@
"react-dom": "19.2.3",
"remotion": "workspace:*",
"tailwind-merge": "3.0.1",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"devDependencies": {
"@eslint/eslintrc": "3.1.0",
@@ -2333,7 +2333,7 @@
"sharp": "0.34.5",
"three": "0.178.0",
"vitest": "4.0.9",
- "zod": "3.22.3",
+ "zod": "4.3.6",
},
"packages": {
"@aashutoshrathi/word-wrap": ["@aashutoshrathi/[email protected]", "", {}, "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA=="],
@@ -7738,7 +7738,7 @@
"zip-stream": ["[email protected]", "", { "dependencies": { "archiver-utils": "5.0.2", "compress-commons": "6.0.2", "readable-stream": "4.7.0" } }, "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA=="],
- "zod": ["[email protected]", "", {}, "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug=="],
+ "zod": ["[email protected]", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="],
"zod-to-json-schema": ["[email protected]", "", { "peerDependencies": { "zod": "^3.25 || ^4" } }, "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA=="],
@@ -7752,12 +7752,6 @@
"@ai-sdk/gateway/@vercel/oidc": ["@vercel/[email protected]", "", {}, "sha512-fnYhv671l+eTTp48gB4zEsTW/YtRgRPnkI2nT7x6qw5rkI1Lq2hTmQIpHPgyThI0znLK+vX2n9XxKdXZ7BUbbw=="],
- "@ai-sdk/gateway/zod": ["[email protected]", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
-
- "@ai-sdk/openai/zod": ["[email protected]", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
-
- "@ai-sdk/provider-utils/zod": ["[email protected]", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
-
"@algolia/autocomplete-preset-algolia/@algolia/client-search": ["@algolia/[email protected]", "", { "dependencies": { "@algolia/client-common": "5.24.0", "@algolia/requester-browser-xhr": "5.24.0", "@algolia/requester-fetch": "5.24.0", "@algolia/requester-node-http": "5.24.0" } }, "sha512-k+nuciQuq7WERNNE+hsx3DX636zIy+9R4xdtvW3PANT2a2BDGOv3fv2mta8+QUMcVTVcGe/Mo3QCb4pc1HNoxA=="],
"@algolia/autocomplete-preset-algolia/algoliasearch": ["[email protected]", "", { "dependencies": { "@algolia/client-abtesting": "5.18.0", "@algolia/client-analytics": "5.18.0", "@algolia/client-common": "5.18.0", "@algolia/client-insights": "5.18.0", "@algolia/client-personalization": "5.18.0", "@algolia/client-query-suggestions": "5.18.0", "@algolia/client-search": "5.18.0", "@algolia/ingestion": "1.18.0", "@algolia/monitoring": "1.18.0", "@algolia/recommend": "5.18.0", "@algolia/requester-browser-xhr": "5.18.0", "@algolia/requester-fetch": "5.18.0", "@algolia/requester-node-http": "5.18.0" } }, "sha512-/tfpK2A4FpS0o+S78o3YSdlqXr0MavJIDlFK3XZrlXLy7vaRXJvW5jYg3v5e/wCaF8y0IpMjkYLhoV6QqfpOgw=="],
@@ -8828,8 +8822,6 @@
"@remotion/lambda-client/@types/express": ["@types/[email protected]", "", { "dependencies": { "@types/body-parser": "1.19.1", "@types/express-serve-static-core": "5.0.4", "@types/serve-static": "1.13.10" } }, "sha512-UZUw8vjpWFXuDnjFTh7/5c2TWDlQqeXHi6hcN7F2XSVT5P+WmUnnbFS3KA6Jnc6IsEqI2qCVu2bK0R0J4A8ZQQ=="],
- "@remotion/mcp/zod": ["[email protected]", "", {}, "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig=="],
-
"@remotion/promo-pages/hls.js": ["[email protected]", "", {}, "sha512-C020dKWEJcyvLnrqsFKW4q6D/6IEzKWdhktIS5bgoyEFE8lHgrFBq4RIngdy113abJOlIruhv8qjg7UX8hwxOw=="],
"@remotion/promo-pages/tailwindcss": ["[email protected]", "", {}, "sha512-QNbdmeS979Efzim2g/bEvfuh+fTcIdp1y7gA+sb6OYSW74rt7Cr7M78AKdf6HqWT3d5AiTb7SwTT3sLQxr4/qw=="],
@@ -9364,8 +9356,6 @@
"acorn-jsx/acorn": ["[email protected]", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="],
- "ai/zod": ["[email protected]", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
-
"ajv-formats/ajv": ["[email protected]", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g=="],
"ansi-align/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "8.0.0", "is-fullwidth-code-point": "3.0.0", "strip-ansi": "6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
@@ -10020,6 +10010,8 @@
"openai/@types/node": ["@types/[email protected]", "", {}, "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA=="],
+ "openai/zod": ["[email protected]", "", {}, "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug=="],
+
"ora/chalk": ["[email protected]", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
"ora/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="],
@@ -10452,8 +10444,6 @@
"template-prompt-to-motion-graphics/typescript-eslint": ["[email protected]", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.46.0", "@typescript-eslint/parser": "8.46.0", "@typescript-eslint/typescript-estree": "8.46.0", "@typescript-eslint/utils": "8.46.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-6+ZrB6y2bT2DX3K+Qd9vn7OFOJR+xSLDj+Aw/N3zBwUt27uTw2sw2TE2+UcY1RiyBZkaGbTkVg9SSdPNUG6aUw=="],
- "template-prompt-to-motion-graphics/zod": ["[email protected]", "", {}, "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig=="],
-
"template-react-router/dotenv": ["[email protected]", "", {}, "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ=="],
"template-react-router/tailwind-merge": ["[email protected]", "", {}, "sha512-AvzE8FmSoXC7nC+oU5GlQJbip2UO7tmOhOfQyOmPhrStOGXHU08j8mZEHZ4BmCqY5dWTCo4ClWkNyRNx1wpT0g=="],
@@ -10702,8 +10692,6 @@
"zip-stream/readable-stream": ["[email protected]", "", { "dependencies": { "abort-controller": "3.0.0", "buffer": "6.0.3", "events": "3.3.0", "process": "0.11.10", "string_decoder": "1.3.0" } }, "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg=="],
- "zod-to-json-schema/zod": ["[email protected]", "", {}, "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig=="],
-
"zod-to-ts/zod": ["[email protected]", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
"zustand/react": ["[email protected]", "", {}, "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ=="],
diff --git a/packages/cli/src/extra-packages.ts b/packages/cli/src/extra-packages.ts
index ec1a47652c..2c03d70356 100644
--- a/packages/cli/src/extra-packages.ts
+++ b/packages/cli/src/extra-packages.ts
@@ -1,9 +1,7 @@
export const EXTRA_PACKAGES: Record<string, string> = {
- zod: '3.22.3',
mediabunny: '1.34.2',
};
export const EXTRA_PACKAGES_DOCS: Record<string, string> = {
- zod: 'https://www.remotion.dev/docs/schemas#prerequisites',
mediabunny: 'https://www.remotion.dev/docs/mediabunny/version',
};
diff --git a/packages/docs/docs/5-0-migration.mdx b/packages/docs/docs/5-0-migration.mdx
index 06fef8476a..cc9787184a 100644
--- a/packages/docs/docs/5-0-migration.mdx
+++ b/packages/docs/docs/5-0-migration.mdx
@@ -55,12 +55,6 @@ It never made sense to have this prop as transitioned elements need to be positi
**Required action**: Remove the `layout` prop.
-## Zod should be upgraded to 3.23.8
-
-Remotion previously used the types of Zod 3.22.3. With Remotion 5.0, the types of 3.23.8 are used.
-
-**Required action**: If you use Zod, Upgrade Zod to 3.23.8.
-
## `measureSpring()` does not accept `from` and `to` options anymore
The values passed in there did not influence the calculation at all. Therefore we removed those options.
diff --git a/packages/docs/docs/schemas.mdx b/packages/docs/docs/schemas.mdx
index 00a3e80b22..07b858fb1d 100644
--- a/packages/docs/docs/schemas.mdx
+++ b/packages/docs/docs/schemas.mdx
@@ -10,7 +10,7 @@ As an alternative to [using TypeScript types](/docs/parameterized-rendering) to
## Prerequisites
-If you want to use this feature, install `[email protected]` and [`@remotion/zod-types`](/docs/zod-types) for Remotion-specific types:
+If you want to use this feature, install `zod` and [`@remotion/zod-types`](/docs/zod-types) for Remotion-specific types:
```bash
npx remotion add @remotion/zod-types zod
diff --git a/packages/docs/docs/zod-types/index.mdx b/packages/docs/docs/zod-types/index.mdx
index f8404ae851..aa5c8a9dfa 100644
--- a/packages/docs/docs/zod-types/index.mdx
+++ b/packages/docs/docs/zod-types/index.mdx
@@ -10,7 +10,6 @@ import TabItem from '@theme/TabItem';
import {ZodTypesTableOfContents} from './TableOfContents';
Includes utility types and Remotion-specific types for [Zod](https://github.com/colinhacks/zod).
-Currently, only Zod version 3.22.3 is supported.
In the next major version of Remotion, the Zod version will be updated.
## Installation
diff --git a/packages/it-tests/src/templates/validate-templates.test.ts b/packages/it-tests/src/templates/validate-templates.test.ts
index 1276c9aa0d..3ecdc50f37 100644
--- a/packages/it-tests/src/templates/validate-templates.test.ts
+++ b/packages/it-tests/src/templates/validate-templates.test.ts
@@ -38,12 +38,6 @@ describe('Templates should be valid', () => {
expect(body.dependencies.react).toMatch(/^\^?19/);
expect(body.dependencies['react-dom']).toMatch(/^\^?19/);
- if (
- body.dependencies['zod'] &&
- !template.shortName.includes('Prompt to Motion Graphics')
- ) {
- expect(body.dependencies['zod']).toBe('3.22.3');
- }
if (body.dependencies['@types/web']) {
expect(body.dependencies['@types/web']).toInclude('0.0.166');
}
diff --git a/packages/skills/skills/remotion/rules/parameters.md b/packages/skills/skills/remotion/rules/parameters.md
index 6ee45788a0..8860800662 100644
--- a/packages/skills/skills/remotion/rules/parameters.md
+++ b/packages/skills/skills/remotion/rules/parameters.md
@@ -7,38 +7,38 @@ metadata:
To make a video parametrizable, a Zod schema can be added to a composition.
-First, `zod` must be installed - it must be exactly version `3.22.3`.
+First, `zod` must be installed .
Search the project for lockfiles and run the correct command depending on the package manager:
If `package-lock.json` is found, use the following command:
```bash
+npm i zod
```
If `bun.lockb` is found, use the following command:
```bash
+bun i zod
```
If `yarn.lock` is found, use the following command:
```bash
+yarn add zod
```
If `pnpm-lock.yaml` is found, use the following command:
```bash
+pnpm i zod
```
Then, a Zod schema can be defined alongside the component:
```tsx title="src/MyComposition.tsx"
-import {z} from 'zod';
+import { z } from "zod";
export const MyCompositionSchema = z.object({
title: z.string(),
@@ -56,11 +56,22 @@ const MyComponent: React.FC<z.infer<typeof MyCompositionSchema>> = () => {
In the root file, the schema can be passed to the composition:
```tsx title="src/Root.tsx"
-import {Composition} from 'remotion';
-import {MycComponent, MyCompositionSchema} from './MyComposition';
+import { Composition } from "remotion";
+import { MycComponent, MyCompositionSchema } from "./MyComposition";
export const RemotionRoot = () => {
- return <Composition id="MyComposition" component={MyComponent} durationInFrames={100} fps={30} width={1080} height={1080} defaultProps={{title: 'Hello World'}} schema={MyCompositionSchema} />;
+ return (
+ <Composition
+ id="MyComposition"
+ component={MyComponent}
+ durationInFrames={100}
+ fps={30}
+ width={1080}
+ height={1080}
+ defaultProps={{ title: "Hello World" }}
+ schema={MyCompositionSchema}
+ />
+ );
};
```
@@ -86,7 +97,7 @@ pnpm exec remotion add @remotion/zod-types # If project uses pnpm
Then import `zColor` from `@remotion/zod-types`:
```tsx
-import {zColor} from '@remotion/zod-types';
+import { zColor } from "@remotion/zod-types";
```
Then use it in the schema:
diff --git a/packages/studio-shared/src/package-info.ts b/packages/studio-shared/src/package-info.ts
index bdd2abf82c..bbf4265e4a 100644
--- a/packages/studio-shared/src/package-info.ts
+++ b/packages/studio-shared/src/package-info.ts
@@ -94,12 +94,6 @@ export type ExtraPackage = {
};
export const extraPackages: ExtraPackage[] = [
- {
- name: 'zod',
- version: '3.22.3',
- description: 'Schema validation library for defining component props',
- docsUrl: 'https://www.remotion.dev/docs/schemas',
- },
{
name: 'mediabunny',
version: '1.34.2',