Requirements
- Node.js -
^22.22.3 || ^24.15.0 || >=26.0.0 - Nuxt -
^4.6.4(requires Nuxt 4) - Nuxt UI -
>=4.13.0 - Package manager - pnpm / npm / yarn
Use a Template
Start a Nuxt 4 project with @movk/nuxt preconfigured using the Movk Nuxt Starter template.
npm create nuxt@latest -- -t gh:mhaibaraai/movk-nuxt-starter
Add to a Nuxt Project
Install Required Dependencies
Movk Nuxt depends on @nuxt/ui and zod. Make sure they are installed.- Make sure you set
shamefully-hoist=truein your.npmrcfile - Or install
tailwindcssin the project root directory
pnpm add @movk/nuxt @nuxt/ui zod tailwindcss
npm install @movk/nuxt @nuxt/ui zod tailwindcss
yarn add @movk/nuxt @nuxt/ui zod tailwindcss
Module Configuration
Register the module in nuxt.config.ts:
export default defineNuxtConfig({
+ modules: ['@movk/nuxt']
})
Import Styles
Import the module styles from your CSS entry, and register that file under css in nuxt.config.ts:
@import "tailwindcss";
@import "@movk/nuxt";
export default defineNuxtConfig({
modules: ['@movk/nuxt'],
+ css: ['~/assets/css/main.css']
})
@movk/nuxt already imports @nuxt/ui, so there is no need to @import "@nuxt/ui" separately. Keep a single Tailwind entry in the project: a second @import "tailwindcss" creates a second Tailwind context whose default theme variables override the ones the module injects, such as --font-sans.Install the Icon Collection
Component icons come from Iconify's lucide collection. With the matching @iconify-json package installed, the module inlines the icons its components use at build time; without it those icons are fetched from the Iconify API at runtime, which fails on intranets and offline.
pnpm add -D @iconify-json/lucide
npm install -D @iconify-json/lucide
yarn add -D @iconify-json/lucide
The module only covers icons used by its own components. Enable scanning so the icon names written in your project are bundled too:
export default defineNuxtConfig({
icon: {
clientBundle: {
scan: { globInclude: ['**/*.{vue,jsx,tsx,ts,md,mdc,mdx,yml,yaml}'] }
}
}
})
globInclude of @nuxt/icon excludes .ts, so icon names declared in composables or constant files are missed — hence the explicit ts entry above.Optional Configuration
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()
import { z } from 'zod'
// Do not use old string validation methods
const emailSchema = z.string().email()
const urlSchema = z.string().url()
const uuidSchema = z.string().uuid()