Getting Started
Installation
Add NotForm to your Vue or Nuxt project and start building validated forms in minutes.
Quick Start
Add notform to your project using your preferred package manager:
pnpm add notform
yarn add notform
npm install notform
bun add notform
Install a Validation Library
notform works with any standard-schema compatible validation library. Choose one based on your preferences:
Zod (Recommended)
TypeScript-first schema validation with excellent type inference:
pnpm add zod
yarn add zod
npm install zod
bun add zod
Valibot
Lightweight and modular validation library:
pnpm add valibot
yarn add valibot
npm install valibot
bun add valibot
Yup
Popular schema validation with a simple API:
pnpm add yup
yarn add yup
npm install yup
bun add yup
ArkType
TypeScript's 1:1 validator:
pnpm add arktype
yarn add arktype
npm install arktype
bun add arktype
You only need to install one validation library. We recommend Zod for its excellent TypeScript support and developer experience.
Framework Compatibility
NotForm is built for Vue 3 and works seamlessly with:
- Vue 3 - Full support with Composition API
- Nuxt 3/4 - Dedicated module with auto-imports available
- Vite - Optimized for Vite-based projects
- TypeScript - Full type safety with zero configuration
TypeScript Support
notform is written in TypeScript and provides full type safety out of the box. Your form state will be automatically typed based on your validation schema:
form.vue
<script lang="ts" setup>
import { useNotForm } from 'notform'
import { z } from 'zod'
const schema = z.object({
name: z.string(),
age: z.number()
})
const { state } = useNotForm({ schema })
// state is typed as { name: string, age: number }
<script>
Verify Installation
To verify everything is working, try importing NotForm in a component:
form.vue
<script setup lang="ts">
import { useNotForm, NotForm, NotField, NotMessage, NotArrayField } from 'notform'
// If this imports without errors, you're all set! ✅
</script>
Next Steps
Now that you have notform installed, here's where to go next:
- Basic Usage - Learn the fundamentals and create your first form
- Nuxt Module - Setup NotForm in your Nuxt project
- useNotForm API - Explore the main composable
- Components - Master field-level validation and form structure