Installation
Below you will learn how to add Formisch to your project.
TypeScript
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,
// ...
}
}Install Valibot
Formisch uses Valibot for schema-based validation. You need to install it first because it is a peer dependency.
npm install valibot # npm
yarn add valibot # yarn
pnpm add valibot # pnpm
bun add valibot # bun
deno add npm:valibot # denoInstall Formisch
You can add Formisch to your project with a single command using your favorite package manager.
npm install @formisch/preact # npm
yarn add @formisch/preact # yarn
pnpm add @formisch/preact # pnpm
bun add @formisch/preact # bun
deno add npm:@formisch/preact # denoThen you can import it into any JavaScript or TypeScript file.
import { … } from '@formisch/preact';