Installation

Valibot is currently available for Node, Bun and Deno. Below you will learn how to add the library to your project.

General

Except for this guide, the rest of this documentation assumes that you are using npm for the import statements in the code examples.

It should make no difference whether you use individual imports or a wildcard import. Tree shaking and code splitting should work in both cases.

If you are using TypeScript, we recommend that you enable strict mode in your tsconfig.json so that all types are calculated correctly.

The minimum required TypeScript version is v5.0.2.

{
  "compilerOptions": {
    "strict": true,
    // ...
  }
}

From npm

For Node and Bun, you can add the library to your project with a single command using your favorite package manager.

npm install valibot     # npm
yarn add valibot        # yarn
pnpm add valibot        # pnpm
bun add valibot         # bun

Then you can import it into any JavaScript or TypeScript file.

// With individual imports
import {} from 'valibot';

// With a wildcard import
import * as v from 'valibot';

From JSR

For Node, Deno and Bun, you can add the library to your project with a single command using your favorite package manager.

deno add jsr:@valibot/valibot      # deno
npx jsr add @valibot/valibot       # npm
yarn dlx jsr add @valibot/valibot  # yarn
pnpm dlx jsr add @valibot/valibot  # pnpm
bunx jsr add @valibot/valibot      # bun

Then you can import it into any JavaScript or TypeScript file.

// With individual imports
import {} from '@valibot/valibot';

// With a wildcard import
import * as v from '@valibot/valibot';

In Deno, you can also directly reference me using jsr: specifiers.

// With individual imports
import {} from 'jsr:@valibot/valibot';

// With a wildcard import
import * as v from 'jsr:@valibot/valibot';

From Deno

With Deno, you can reference the library directly through our deno.land/x URL.

// With individual imports
import {} from 'https://deno.land/x/valibot/mod.ts';

// With a wildcard import
import * as v from 'https://deno.land/x/valibot/mod.ts';

Contributors

Thanks to all the contributors who helped make this page better!

  • GitHub profile picture of fabian-hiller
  • GitHub profile picture of Shyam-Chen
  • GitHub profile picture of jojojojojoj5564656465465

Partners

Thanks to our partners who support the project ideally and financially.

Sponsors

Thanks to our GitHub sponsors who support the project financially.

  • GitHub profile picture of antfu
  • GitHub profile picture of Thanaen
  • GitHub profile picture of osdiab
  • GitHub profile picture of ruiaraujo012
  • GitHub profile picture of hyunbinseo
  • GitHub profile picture of F0rce
  • GitHub profile picture of Unique-Pixels
  • GitHub profile picture of jdgamble555
  • GitHub profile picture of nickytonline
  • GitHub profile picture of KubaJastrz
  • GitHub profile picture of caegdeveloper
  • GitHub profile picture of dslatkin