Skip to main content

@remotion/zod-types-v3v4.0.426

@remotion/zod-types creates schemas using Zod v4 since Remotion v4.0.426.

This package is for if you are using Zod v3.22.3 and want to compose functions like zColor() with Zod v3.22.3 schemas.

Installation

npx remotion add @remotion/zod-types-v3

Usage

Using @remotion/zod-types-v3 with Zod v3
import {z} from 'zod'; // zod = 3.22.3 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.22.3 schema types.

When to use

Use @remotion/zod-types with Zod v4:

import {z} from 'zod'; // zod = 4.x.x
import {zColor} from '@remotion/zod-types';

export const mySchema = z.object({
  color: zColor(),
});

Use @remotion/zod-types if you are not nesting schemas:

import {zColor} from '@remotion/zod-types';
import {visualControl} from '@remotion/studio';

export const myVisualControl = visualControl('my-color', '#fff', zColor());

Use @remotion/zod-types-v3 with Zod v3.22.3:

import {z} from 'zod'; // zod = 3.22.3
import {zColor} from '@remotion/zod-types-v3';

export const mySchema = z.object({
  color: zColor(),
});

Other Zod 3.x.x versions are not officially supported.

See also