Installation

Playground
Learn how to install and configure Nuxt UI in your Nuxt application.

Setup

Add to a Nuxt project

Install the Nuxt UI package

pnpm add @nuxt/ui
If you're using pnpm, ensure that you either set shamefully-hoist=true in your .npmrc file or install tailwindcss in your project's root directory.

Add the Nuxt UI module in your nuxt.config.ts

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

Import Tailwind CSS and Nuxt UI in your CSS

@import "tailwindcss";
@import "@nuxt/ui";
It's recommended to install the Tailwind CSS IntelliSense extension for VSCode and add the following settings:
.vscode/settings.json
{
  "files.associations": {
    "*.css": "tailwindcss"
  },
  "editor.quickSuggestions": {
    "strings": "on"
  },
  "tailwindCSS.classAttributes": ["class", "ui"],
  "tailwindCSS.experimental.classRegex": [
    ["ui:\\s*{([^)]*)\\s*}", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
  ]
}

Wrap your app with App component

app.vue
<template>
  <UApp>
    <NuxtPage />
  </UApp>
</template>
The App component provides global configurations and is required for Toast, Tooltip components to work as well as Programmatic Overlays.

Use a Nuxt template

To quickly get started with Nuxt UI, you can use the starter template by running:

Terminal
npm create nuxt@latest -- -t ui

You can also get started with one of our official templates:

Starter

A minimal template to get started with Nuxt UI.

Landing

A modern landing page template powered by Nuxt Content.

Docs

A documentation template powered by Nuxt Content.

SaaS

A SaaS template with landing, pricing, docs and blog powered by Nuxt Content.

Dashboard

A dashboard template with multi-column layout for building sophisticated admin interfaces.

Chat

An AI chatbot template to build your own chatbot powered by Nuxt MDC and Vercel AI SDK.

Portfolio

A sleek portfolio template to showcase your work, skills and blog powered by Nuxt Content.

Changelog

A changelog template to display your repository releases notes from GitHub powered by Nuxt MDC.

You can use the Use this template button on GitHub to create a new repository or use the CLI:

npm create nuxt@latest -- -t ui

Options

You can customize Nuxt UI by providing options in your nuxt.config.ts.

prefix

Use the prefix option to change the prefix of the components.

  • Default: U
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/ui'],
  css: ['~/assets/css/main.css'],
  ui: {
    prefix: 'Nuxt'
  }
})

fonts

Use the fonts option to enable or disable the @nuxt/fonts module.

  • Default: true
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/ui'],
  css: ['~/assets/css/main.css'],
  ui: {
    fonts: false
  }
})

colorMode

Use the colorMode option to enable or disable the @nuxt/color-mode module.

  • Default: true
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/ui'],
  css: ['~/assets/css/main.css'],
  ui: {
    colorMode: false
  }
})

theme.colors

Use the theme.colors option to define the dynamic color aliases used to generate components theme.

  • Default: ['primary', 'secondary', 'success', 'info', 'warning', 'error']
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/ui'],
  css: ['~/assets/css/main.css'],
  ui: {
    theme: {
      colors: ['primary', 'error']
    }
  }
})
Learn more about color customization and theming in the Theme section.

theme.transitions

Use the theme.transitions option to enable or disable transitions on components.

  • Default: true
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/ui'],
  css: ['~/assets/css/main.css'],
  ui: {
    theme: {
      transitions: false
    }
  }
})
This option adds the transition-colors class on components with hover or active states.

theme.defaultVariants

Use the theme.defaultVariants option to override the default color and size variants for components.

  • Default: { color: 'primary', size: 'md' }
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/ui'],
  css: ['~/assets/css/main.css'],
  ui: {
    theme: {
      defaultVariants: {
        color: 'neutral',
        size: 'sm'
      }
    }
  }
})

mdc

Use the mdc option to force the import of Nuxt UI <Prose> components even if @nuxtjs/mdc or @nuxt/content is not installed.

  • Default: false
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/ui'],
  css: ['~/assets/css/main.css'],
  ui: {
    mdc: true
  }
})

content

Use the content option to force the import of Nuxt UI <Prose> and <UContent> components even if @nuxt/content is not installed (@nuxtjs/mdc is installed by @nuxt/content).

  • Default: false
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/ui'],
  css: ['~/assets/css/main.css'],
  ui: {
    content: true
  }
})

Continuous releases

Nuxt UI uses pkg.pr.new for continuous preview releases, providing developers with instant access to the latest features and bug fixes without waiting for official releases.

Automatic preview releases are created for all commits and PRs to the v4 branch. Use them by replacing your package version with the specific commit hash or PR number.

package.json
{
  "dependencies": {
-   "@nuxt/ui": "^4.0.0",
+   "@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@4c96909",
  }
}
pkg.pr.new will automatically comment on PRs with the installation URL, making it easy to test changes.