Installation

View source
Install and configure the Movk Nuxt module in a Nuxt 4 project.
Using Vue + Vite (non-Nuxt)? See the Vue / Vite mode instructions.

Requirements

  • Node.js - ^20.19.0 || >=22.12.0
  • Nuxt - >=4.4.2 (requires Nuxt 4)
  • Package manager - pnpm / npm / yarn

Add to a Nuxt Project

Install Required Dependencies

Movk Nuxt depends on @nuxt/ui and zod. Make sure they are installed.
If you are using pnpm:
  • Make sure you set shamefully-hoist=true in your .npmrc file
  • Or install tailwindcss in the project root directory
pnpm add @movk/nuxt @nuxt/ui zod tailwindcss

Module Configuration

Register the module in nuxt.config.ts:

nuxt.config.ts
export default defineNuxtConfig({
+  modules: ['@movk/nuxt']
})

Optional Configuration

nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@movk/nuxt'],
  movk: {
    // Component prefix (default: 'M')
    prefix: 'M'
  }
})

TypeScript Support

Movk Nuxt provides full TypeScript type definitions that are automatically injected into your project after installation.

import type { z } from 'zod'

const { afz } = useAutoForm()

const schema = afz.object({
  email: afz.email(), // ✅ Full type hints
  age: afz.number()
})

// Infer data type from schema
type FormData = z.output<typeof schema>

Zod v4 Integration

Movk Nuxt uses Zod v4, which introduces some important API changes:

import { z } from 'zod'

// Use dedicated validation functions
const emailSchema = z.email()
const urlSchema = z.url()
const uuidSchema = z.uuid()
const datetimeSchema = z.iso.datetime()
See the official Zod documentation for more v4 changes
Copyright © 2025 - 2026 YiXuan - MIT License