Skip to content
Library
Forms

Zod

TypeScript-first schema validation often paired with Preact forms and loaders.

UnverifiedActive

Unverified

Compatibility has not been verified yet in the PreactHub catalog.

Packagezod

Facts at a glance
Preact compatibility
Unverified
Tested Preact versions
Not documented
TypeScript
Native TypeScript
SSR
SSR supported
Maintenance
Active
License
MIT
Last verified
Not yet verified
Terminal
npm install zod
preact-example.ts
import { z } from "zod"; const signupSchema = z.object({ email: z.email() });

Introduction

Zod is not a Preact UI library, but it is frequently part of Preact form validation and loader validation workflows.

Preact configuration

No framework adapter is required for schema parsing itself.

SSR notes

Pure validation logic works the same on the server and client.

Islands notes

When using this library inside an island, keep browser-specific setup inside the island component or an effect, and pass only serializable props from the server-rendered page.

Alternatives