You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "Build UIs with @nuxt/ui v4 — 125+ accessible Vue components with Tailwind CSS theming. Use when creating interfaces, customizing themes to match a brand, building forms, or composing layouts like dashboards, docs sites, and chat interfaces.",
@@ -5,7 +5,86 @@ description: Build UIs with @nuxt/ui v4 — 125+ accessible Vue components with
5
5
6
6
# Nuxt UI
7
7
8
-
Vue component library built on [Reka UI](https://reka-ui.com/) + [Tailwind CSS](https://tailwindcss.com/) + [Tailwind Variants](https://www.tailwind-variants.org/). Works with Nuxt, Vue (Vite), Laravel (Inertia), and AdonisJS (Inertia).
8
+
Vue component library built on [Reka UI](https://reka-ui.com/) + [Tailwind CSS](https://tailwindcss.com/) + [Tailwind Variants](https://www.tailwind-variants.org/). Works with Nuxt, Vue (Vite), Laravel (Vite + Inertia), and AdonisJS (Vite + Inertia).
9
+
10
+
## MCP Server
11
+
12
+
For component API details (props, slots, events, full documentation, examples), use the [Nuxt UI MCP server](https://ui.nuxt.com/docs/getting-started/ai/mcp). If not already configured, add it:
-`get_component` — full component documentation with usage examples
31
+
-`get_component_metadata` — props, slots, events (lightweight, no docs content)
32
+
-`get_example` — real-world code examples
33
+
34
+
When you need to know **what a component accepts** or **how its API works**, use the MCP. This skill teaches you **when to use which component** and **how to build well**.
35
+
36
+
## Core rules (always apply)
37
+
38
+
1.**Always wrap the app in `UApp`** — required for toasts, tooltips, and programmatic overlays. Accepts a `locale` prop for i18n.
39
+
2.**Always use semantic colors** — `text-default`, `bg-elevated`, `border-muted`, etc. Never use raw Tailwind palette colors like `text-gray-500`.
40
+
3.**Read generated theme files for slot names** — Nuxt: `.nuxt/ui/<component>.ts`, Vue: `node_modules/.nuxt-ui/ui/<component>.ts`. These show every slot, variant, and default class for any component.
5.**Icons use `i-{collection}-{name}` format** — `lucide` is the default collection. Use the MCP `search_icons` tool to find icons, or browse at [icones.js.org](https://icones.js.org).
43
+
44
+
## How to use this skill
45
+
46
+
Based on the task, load the relevant reference files **before writing any code**. Don't load everything — only what's needed.
47
+
48
+
### Reference files
49
+
50
+
**Guidelines** — design decisions and conventions:
-[component-selection](references/guidelines/component-selection.md) — decision matrices: when to use Modal vs Slideover, Select vs SelectMenu, Toast vs Alert, etc.
| Add a modal, slideover, or drawer | conventions, component-selection, overlays |
84
+
| Build site navigation | conventions, component-selection, navigation |
85
+
| Build a documentation site | conventions, docs |
86
+
| Add a rich text editor | conventions, editor |
87
+
| General UI work | conventions, component-selection |
9
88
10
89
## Installation
11
90
@@ -67,7 +146,6 @@ import ui from '@nuxt/ui/vue-plugin'
67
146
importAppfrom'./App.vue'
68
147
69
148
const app =createApp(App)
70
-
71
149
const router =createRouter({
72
150
routes: [],
73
151
history: createWebHistory()
@@ -93,242 +171,5 @@ app.mount('#app')
93
171
</template>
94
172
```
95
173
96
-
> **Vue**: Add `class="isolate"` to your root `<div id="app">` in `index.html`.
97
-
98
-
> **Vue + Inertia**: Use `ui({ router: 'inertia' })` in `vite.config.ts`.
99
-
100
-
### UApp
101
-
102
-
Wrapping your app in `UApp` is **required** — it provides global config for toasts, tooltips, and programmatic overlays. It also accepts a `locale` prop for i18n (see [composables reference](references/composables.md)).
103
-
104
-
## Icons
105
-
106
-
Nuxt UI uses [Iconify](https://iconify.design/) for 200,000+ icons. In Nuxt, `@nuxt/icon` is auto-registered. In Vue, icons work out of the box via the Vite plugin.
107
-
108
-
### Naming convention
109
-
110
-
Icons use the format `i-{collection}-{name}`:
111
-
112
-
```vue
113
-
<UIcon name="i-lucide-sun" class="size-5" />
114
-
<UButton icon="i-lucide-plus" label="Add" />
115
-
<UAlert icon="i-lucide-info" title="Heads up" />
116
-
```
117
-
118
-
> Browse all icons at [icones.js.org](https://icones.js.org). The `lucide` collection is used throughout Nuxt UI defaults.
119
-
120
-
### Install icon collections locally
121
-
122
-
```bash
123
-
pnpm i @iconify-json/lucide
124
-
pnpm i @iconify-json/simple-icons
125
-
```
126
-
127
-
### Custom local collections (Nuxt)
128
-
129
-
```ts
130
-
// nuxt.config.ts
131
-
exportdefaultdefineNuxtConfig({
132
-
icon: {
133
-
customCollections: [{
134
-
prefix: 'custom',
135
-
dir: './app/assets/icons'
136
-
}]
137
-
}
138
-
})
139
-
```
140
-
141
-
```vue
142
-
<UIcon name="i-custom-my-icon" />
143
-
```
144
-
145
-
## Theming & Branding
146
-
147
-
Nuxt UI ships with a default look. The goal is to adapt it to your brand so every app looks unique.
148
-
149
-
**Always use semantic utilities** (`text-default`, `bg-elevated`, `border-muted`), never raw Tailwind palette colors. See [references/theming.md](references/theming.md) for the full list.
> For CSS variables, custom colors, global config, compound variants, and a **full brand customization playbook**, see [references/theming.md](references/theming.md)
- Generated theme files — all slots, variants, and default classes for any component (Nuxt: `.nuxt/ui/<component>.ts`, Vue: `node_modules/.nuxt-ui/ui/<component>.ts`)
174
+
> Add `class="isolate"` to your root `<div id="app">` in `index.html`.
175
+
> For Inertia: use `ui({ router: 'inertia' })` in `vite.config.ts`.
0 commit comments