21

Nuxt Module

Seamless integration with Nuxt 4, featuring auto-imports and zero configuration.

The official notform-nuxt module provides a first-class developer experience for using NotForm in Nuxt applications. It handles component and composable registration automatically.

Installation

The module is registered in the official Nuxt Modules Registry, meaning you can easily install it using the Nuxt CLI.

npx nuxi module add notform
This command will automatically install notform-nuxt and add it to the modules array in your nuxt.config.ts. You still need to install your preferred validation library (e.g., zod).
pnpm add zod

Manual Setup

If you prefer to install manually, add the dependency:

pnpm add notform-nuxt

Then, add it to your nuxt.config.ts:

nuxt.config.ts
export default defineNuxtConfig({
  modules: ['notform-nuxt'],
})

Features

Auto-imports

All core components and composables are available globally in your Vue files without any manual imports.

ExportTypeDescription
useNotFormComposableThe core form management composable.
NotFormComponentContext provider and <form> wrapper.
NotFieldComponentRenderless wrapper for single fields.
NotMessageComponentError message renderer.
NotArrayFieldComponentRenderless wrapper for dynamic array fields.

Type Safety

Types for NotFormInstance, UseNotFormConfig, and NotFieldProps are automatically injected into your project's global types for perfect IntelliSense.

Server-side Rendering (SSR)

NotForm is fully compatible with Nuxt's SSR engine. Form state and validation rules are safely executed on the server during the initial render without hydration mismatches.