Installation
Nuxt UI Pro is a collection of Vue components, composables and utils built on top of Nuxt UI, oriented on structure and layout and designed to be used as building blocks for your app.
Setup
Add to a Nuxt project
Install the Nuxt UI Pro v3 alpha package
pnpm add @nuxt/ui-pro@next
yarn add @nuxt/ui-pro@next
npm install @nuxt/ui-pro@next
bun add @nuxt/ui-pro@next
shamefully-hoist=true
in your .npmrc
file or install tailwindcss@next
in your project's root directory.Add the Nuxt UI Pro module in your nuxt.config.ts
export default defineNuxtConfig({
modules: ['@nuxt/ui-pro']
})
@nuxt/ui-pro
module automatically includes the @nuxt/ui
module, so you don't need to install it separately.Import Tailwind CSS and Nuxt UI Pro in your CSS
@import "tailwindcss";
@import "@nuxt/ui-pro";
@nuxt/ui-pro
CSS file includes the @nuxt/ui
CSS file, so you don't need to import it separately.css
property in your nuxt.config.ts
to import your CSS file.export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
css: ['~/assets/css/main.css']
})
"files.associations": {
"*.css": "tailwindcss"
},
"editor.quickSuggestions": {
"strings": "on"
}
Wrap your app with App component
<template>
<UApp>
<NuxtPage />
</UApp>
</template>
Upgrade from Nuxt UI
Replace @nuxt/ui
package with @nuxt/ui-pro
{
"dependencies": {
- "@nuxt/ui": "3.0.0-alpha.9",
+ "@nuxt/ui-pro": "3.0.0-alpha.9",
}
}
Replace @nuxt/ui
module with @nuxt/ui-pro
export default defineNuxtConfig({
- modules: ['@nuxt/ui'],
+ modules: ['@nuxt/ui-pro']
})
Replace @nuxt/ui
CSS import with @nuxt/ui-pro
@import "tailwindcss";
- @import "@nuxt/ui";
+ @import "@nuxt/ui-pro";
Use an official template
You can get started with our minimal starter or one of our official templates:
You can use the Use this template
button on GitHub to create a new repository or use the CLI:
npx nuxi init -t github:nuxt-ui-pro/starter my-starter
npx nuxi init -t github:nuxt-ui-pro/dashboard my-dashboard
npx nuxi init -t github:nuxt-ui-pro/saas my-saas
npx nuxi init -t github:nuxt-ui-pro/docs my-docs
npx nuxi init -t github:nuxt-ui-pro/landing my-landing
Options
You can customize Nuxt UI Pro by providing options in your nuxt.config.ts
.
license
Use the license
option to override the default behavior of reading the license key from the NUXT_UI_PRO_LICENSE
environment variable.
export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
uiPro: {
license: process.env.MY_ENVIRONMENT_VARIABLE
}
})
mdc
Use the mdc
option to force the import of MDC components even if @nuxtjs/mdc
or @nuxt/content
is not installed.
- Default:
false
export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
uiPro: {
mdc: true
}
})
content
Use the content
option to force the import of content components even if @nuxt/content
is not installed.
- Default:
false
export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
uiPro: {
content: true
}
})
prefix
Use the prefix
option to change the prefix of the components.
- Default:
U
export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
ui: {
prefix: 'Nuxt'
}
})
fonts
Use the fonts
option to enable or disable the @nuxt/fonts
module.
- Default:
true
export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
ui: {
fonts: false
}
})
colorMode
Use the colorMode
option to enable or disable the @nuxt/color-mode
module.
- Default:
true
export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
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']
export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
ui: {
theme: {
colors: ['primary', 'error']
}
}
})
theme.transitions
Use the theme.transitions
option to enable or disable transitions on components.
- Default:
true
export default defineNuxtConfig({
modules: ['@nuxt/ui-pro'],
ui: {
theme: {
transitions: false
}
}
})
transition-colors
class on components with hover or active states.Continuous Releases
Nuxt UI Pro v3 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.
Preview releases are automatically generated for every commit to the v3
branch and pull requests targeting the v3
branch. To use it into your project, use the installation command below by replacing 9a36879
with any commit hash or pull request number.
pnpm add https://pkg.pr.new/@nuxt/ui-pro@9a36879
yarn add https://pkg.pr.new/@nuxt/ui-pro@9a36879
npm install https://pkg.pr.new/@nuxt/ui-pro@9a36879
bun add https://pkg.pr.new/@nuxt/ui-pro@9a36879