💎 Zod 4 现已稳定发布! 阅读公告。
Zod logo

生态系统

Edit this page

注意 — 为了避免臃肿和混淆,生态系统部分在 Zod 4 发布时已被清除。如果您已更新您的库以与 Zod 4 一起使用,请提交 PR 以将其添加回来。对于与 Zod 3 一起使用的库,请参考 v3.zod.dev

基于 Zod 构建或原生支持 Zod 的工具正在不断增加!如果你基于 Zod 开发了工具或库,请通过 Twitter 告诉我,或在 讨论区 发起讨论。我会将其添加到下面,并在推特上分享。

资源

API 库

NameStarsDescription
tRPC⭐️ 39201Build end-to-end typesafe APIs without GraphQL.
oRPC⭐️ 4533Typesafe APIs Made Simple
upfetch⭐️ 1359Advanced fetch client builder
nestjs-zod⭐️ 931Integrate nestjs and zod. Create nestjs DTOs using zod, serialize with zod, and generate OpenAPI documentation from zod schemas
Express Zod API⭐️ 790Build Express-based API with I/O validation and middlewares, OpenAPI docs and type-safe client.
Zod Sockets⭐️ 110Socket.IO solution with I/O validation, an AsyncAPI generator, and a type-safe events map.
GQLoom⭐️ 80Weave GraphQL schema and resolvers using Zod.
Zod JSON-RPC⭐️ 15Type-safe JSON-RPC 2.0 client/server library using Zod.

表单集成

NameStarsDescription
Superforms⭐️ 2699Making SvelteKit forms a pleasure to use!
conform⭐️ 2507A type-safe form validation library utilizing web fundamentals to progressively enhance HTML Forms with full support for server frameworks like Remix and Next.js.
zod-validation-error⭐️ 997Generate user-friendly error messages from ZodError instances.
regle⭐️ 349Headless form validation library for Vue.js.
svelte-jsonschema-form⭐️ 138Svelte 5 library for creating forms based on JSON schema.
frrm⭐️ 30Tiny 0.5kb Zod-based, HTML form abstraction that goes brr.
react-f3⭐️ 10Components, hooks & utilities for creating and managing delightfully simple form experiences in React.

Zod 到 X

NameStarsDescription
prisma-zod-generator⭐️ 783Generate Zod schemas from Prisma schema with full ZodObject method support
zod-openapi⭐️ 591Use Zod Schemas to create OpenAPI v3.x documentation
convex-helpers⭐️ 370Use Zod to validate arguments and return values of Convex functions, and to create Convex database schemas
zod2md⭐️ 132Generate Markdown docs from Zod schemas
@traversable/zod⭐️ 132Build your own "Zod to x" library, or pick one of 25+ off-the-shelf transformers
fastify-zod-openapi⭐️ 115Fastify type provider, validation, serialization and @fastify/swagger support for Zod schemas
zod-to-mongo-schema⭐️ 5Convert Zod schemas to MongoDB-compatible JSON Schemas effortlessly

X 到 Zod

NameStarsDescription
orval⭐️ 5074Generate Zod schemas from OpenAPI schemas
Hey API⭐️ 3731The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.
kubb⭐️ 1505The ultimate toolkit for working with APIs.
Prisma Zod Generator⭐️ 783Generates Zod schemas with input/result/pure variants, minimal/full/custom, selective emit/filtering, single/multi-file output, @zod rules, relation depth guards.
convex-helpers⭐️ 370Generate Zod schemas from Convex validators
DRZL⭐️ 88Drizzle ORM toolkit that can generate Zod validators from schema(s), plus typed services and strongly typed routers (oRPC/tRPC/etc).
valype⭐️ 63Typescript's type definition to runtime validator (including zod).

模拟库

NameStarsDescription
@traversable/zod-test⭐️ 132Random zod schema generator built for fuzz testing; includes generators for both valid and invalid data
zod-schema-faker⭐️ 95Generate mock data from zod schemas. Powered by @faker-js/faker and randexp.js.
zocker⭐️ 74Generates valid, semantically meaningful data for your Zod schemas.

使用 Zod 的项目

NameStarsDescription
Composable Functions⭐️ 738Types and functions to make composition easy and safe.
zod-config⭐️ 129Load configurations across multiple sources with flexible adapters, ensuring type safety with Zod.
zod-xlsx⭐️ 49A xlsx based resource validator using Zod schemas for data imports and more
Fn Sphere⭐️ 26A Zod-first toolkit for building powerful, type-safe filter experiences across web apps.
zodgres⭐️ 19Postgres.js + Zod: Database collections with static type inference and automatic migrations
bupkis⭐️ 4Uncommonly extensible assertions for the beautiful people

Zod 工具集

NameStarsDescription
zod-playground⭐️ 118Interactive playground for testing and exploring Zod and Zod mini schemas in real-time.
zod-ir⭐️ 52Comprehensive validation for Iranian data structures (National Code, Bank Cards, Sheba, Crypto, etc) with smart metadata extraction (Bank Names, Logos). Zero dependencies.
eslint-plugin-zod-x⭐️ 47ESLint plugin that adds custom linting rules to enforce best practices when using Zod
eslint-plugin-import-zod⭐️ 46ESLint plugin to enforce namespace imports for Zod.
Zod Compare⭐️ 9A utility library for recursively comparing Zod schemas.

On this page