Installation

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

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
You can also click Use this template on GitHub to create a repository from it.

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']
})

Import Styles

Import the module styles from your CSS entry, and register that file under css in nuxt.config.ts:

app/assets/css/main.css
@import "tailwindcss";
@import "@movk/nuxt";
nuxt.config.ts
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

The module only covers icons used by its own components. Enable scanning so the icon names written in your project are bundled too:

nuxt.config.ts
export default defineNuxtConfig({
  icon: {
    clientBundle: {
      scan: { globInclude: ['**/*.{vue,jsx,tsx,ts,md,mdc,mdx,yml,yaml}'] }
    }
  }
})
The default 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

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