Integrations
Standard Schema
ArkType is proud to support and co-author the new Standard Schema API with Valibot and Zod.
Standard Schema allows you and your dependencies to integrate library-agnostic validation logic. If you're building or maintaining a library with a peer dependency on ArkType and/or other validation libraries, we'd recommend consuming it through Standard Schema's API if possible so that your users can choose the solution that best suits their needs!
As definitions
Any Standard Schema compliant validator can also be passed directly to type, either at the top level or nested inside a structural definition, and will be fully inferred and validated:
This makes ArkType a universal composition layer- mix and match validators from any ecosystem in a single definition.
JSON Schema
ArkType supports bidirectional conversion with JSON Schema.
Type to JSON Schema
Every Type instance has a toJsonSchema() method that generates a corresponding JSON Schema. See the configuration docs for options including draft targets, fallback handlers, and cyclic type support.
JSON Schema to Type
The @ark/json-schema package converts JSON Schema directly into ArkType Types:
See the @ark/json-schema README for more details and limitations.
tRPC
ArkType can easily be used with tRPC:
drizzle
Drizzle maintains an official drizzle-arktype package that can be used to create Types for your Drizzle schemas.
react-hook-form
react-hook-form has built-in support for ArkType via @hookform/resolvers:
For a custom controlled input, you can pass the inferred type into the hook itself:
hono
Hono has built-in support for ArkType via @hono/arktype-validator:
hono-openapi also offers experimental support for OpenAPI docgen.
oRPC
oRPC has built-in support for Standard Schema, so ArkType works seamlessly right out of the box: