Skip to content

🎥 Make videos programmatically with React

Add docs, example, and sidebar for @remotion/zod-types-v3

Jonny Burger074a58a170d7
diff --git a/bun.lock b/bun.lock
index 4424cc23c8..5163c335d7 100644
--- a/bun.lock
+++ b/bun.lock
@@ -424,6 +424,7 @@
"@remotion/webcodecs": "workspace:*",
"@remotion/whisper-web": "workspace:*",
"@remotion/zod-types": "workspace:*",
+ "@remotion/zod-types-v3": "workspace:*",
"@rive-app/canvas-advanced": "2.31.5",
"@shopify/react-native-skia": "2.0.0",
"@swc/core": "^1.3.80",
@@ -624,6 +625,7 @@
"@remotion/webcodecs": "workspace:*",
"@remotion/whisper-web": "workspace:*",
"@remotion/zod-types": "workspace:*",
+ "@remotion/zod-types-v3": "workspace:*",
"@shopify/react-native-skia": "2.0.0",
"@types/express": "^4.17.11",
"@types/hls.js": "^0.13.3",
diff --git a/packages/docs/docs/zod-types/v3.mdx b/packages/docs/docs/zod-types/v3.mdx
new file mode 100644
index 0000000000..8dabcf45ca
--- /dev/null
+++ b/packages/docs/docs/zod-types/v3.mdx
@@ -0,0 +1,34 @@
+---
+image: /generated/articles-docs-zod-types-v3.png
+sidebar_label: Zod v3
+title: '@remotion/zod-types-v3'
+crumb: Schema
+---
+
+`@remotion/zod-types` creates schemas using Zod v4. If you are still using Zod v3 and need to compose Remotion schemas into a `z.object()`, use `@remotion/zod-types-v3` instead.
+
+## Installation
+
+<Installation pkg="@remotion/zod-types-v3" />
+
+## Usage
+
+```tsx title="Using @remotion/zod-types-v3 with Zod v3"
+import {z} from 'zod';
+import {zColor} from '@remotion/zod-types-v3';
+
+export const mySchema = z.object({
+ color: zColor(),
+});
+```
+
+The package exports the same `zColor()`, `zTextarea()`, and `zMatrix()` functions as `@remotion/zod-types`, but they return Zod v3 schema types.
+
+## When to use
+
+- Use `@remotion/zod-types` (default) if you are using Zod v4.
+- Use `@remotion/zod-types-v3` if you are still on Zod v3.
+
+## See also
+
+- [`@remotion/zod-types`](/docs/zod-types)
diff --git a/packages/docs/package.json b/packages/docs/package.json
index 99b4ece6e6..8170a25c6f 100644
--- a/packages/docs/package.json
+++ b/packages/docs/package.json
@@ -80,6 +80,7 @@
"@remotion/webcodecs": "workspace:*",
"@remotion/whisper-web": "workspace:*",
"@remotion/zod-types": "workspace:*",
+ "@remotion/zod-types-v3": "workspace:*",
"@rive-app/canvas-advanced": "2.31.5",
"@shopify/react-native-skia": "2.0.0",
"@swc/core": "^1.3.80",
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index da0ed81765..3b924af0a1 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -766,6 +766,7 @@ const sidebars: SidebarsConfig = {
'zod-types/z-color',
'zod-types/z-textarea',
'zod-types/z-matrix',
+ 'zod-types/v3',
],
},
{
diff --git a/packages/example/package.json b/packages/example/package.json
index ede99ba8bc..279a9ad22d 100644
--- a/packages/example/package.json
+++ b/packages/example/package.json
@@ -70,6 +70,7 @@
"@remotion/media-parser": "workspace:*",
"@remotion/whisper-web": "workspace:*",
"@remotion/zod-types": "workspace:*",
+ "@remotion/zod-types-v3": "workspace:*",
"@shopify/react-native-skia": "2.0.0",
"@types/express": "^4.17.11",
"@types/hls.js": "^0.13.3",
diff --git a/packages/example/tsconfig.json b/packages/example/tsconfig.json
index abf81d2eeb..7be2fca483 100644
--- a/packages/example/tsconfig.json
+++ b/packages/example/tsconfig.json
@@ -35,6 +35,7 @@
{"path": "../three"},
{"path": "../transitions"},
{"path": "../zod-types"},
+ {"path": "../zod-types-v3"},
{"path": "../svg-3d-engine"},
{"path": "../media-parser"},
{"path": "../webcodecs"},