Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Guidance for building UIs with Nuxt UI, the official Tailwind-based component library for Nuxt.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: nuxt-ui3description: 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.4---56# Nuxt UI78Vue 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).910## MCP Server1112For 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:1314**Cursor** — `.cursor/mcp.json`:1516```json17{ "mcpServers": { "nuxt-ui": { "type": "http", "url": "https://ui.nuxt.com/mcp" } } }18```1920**Claude Code**:2122```bash23claude mcp add --transport http nuxt-ui https://ui.nuxt.com/mcp24```2526Key MCP tools:27- `search_components` — find components by name, description, or category (no params = list all)28- `search_composables` — find composables by name or description (no params = list all)29- `search_icons` — search Iconify icons (defaults to `lucide`), returns `i-{prefix}-{name}` names30- `get_component` — full component documentation with usage examples31- `get_component_metadata` — props, slots, events (lightweight, no docs content)32- `get_example` — real-world code examples3334When 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**.3536## Core rules (always apply)37381. **Always wrap the app in `UApp`** — required for toasts, tooltips, and programmatic overlays. Accepts a `locale` prop for i18n.392. **Always use semantic colors** — `text-default`, `bg-elevated`, `border-muted`, etc. Never use raw Tailwind palette colors like `text-gray-500`.403. **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.414. **Override priority** (highest wins): `ui` prop / `class` prop → global config → theme defaults.425. **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).4344## How to use this skill4546Based on the task, load the relevant reference files **before writing any code**. Don't load everything — only what's needed.4748### Reference files4950**Guidelines** — design decisions and conventions:51- [design-system](references/guidelines/design-system.md) — semantic colors, theming, brand customization, variants, the `ui` prop52- [component-selection](references/guidelines/component-selection.md) — decision matrices: when to use Modal vs Slideover, Select vs SelectMenu, Toast vs Alert, etc.53- [conventions](references/guidelines/conventions.md) — coding patterns, slot naming, items arrays, composables, keyboard shortcuts54- [forms](references/guidelines/forms.md) — form validation, field layout, error handling, Standard Schema5556**Layouts** — full page structure patterns:57- [landing](references/layouts/landing.md) — landing pages, blog, changelog, pricing58- [dashboard](references/layouts/dashboard.md) — admin UI with sidebar and panels59- [docs](references/layouts/docs.md) — documentation sites with navigation and TOC60- [chat](references/layouts/chat.md) — AI chat with Vercel AI SDK61- [editor](references/layouts/editor.md) — rich text editor with toolbars6263**Recipes** — complete patterns for common tasks:64- [data-tables](references/recipes/data-tables.md) — tables with filters, pagination, sorting, selection65- [auth](references/recipes/auth.md) — login, signup, forgot password forms66- [overlays](references/recipes/overlays.md) — modals, slideovers, drawers, command palette67- [navigation](references/recipes/navigation.md) — headers, sidebars, breadcrumbs, tabs6869**Quick reference:**70- [components](references/components.md) — categorized component index for finding the right component name7172### Routing table7374| Task | Load these references |75|---|---|76| Build a landing page | design-system, conventions, landing |77| Build a dashboard / admin UI | conventions, component-selection, dashboard |78| Add a settings page | conventions, forms |79| Create a login / signup form | conventions, forms, auth |80| Display data in a table | conventions, component-selection, data-tables |81| Customize theme / brand colors | design-system |82| Add a chat interface | conventions, chat |83| 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| Render markdown | component-selection, components, docs |87| Add a rich text editor | conventions, editor |88| General UI work | conventions, component-selection |8990## Installation9192### Nuxt9394```bash95pnpm add @nuxt/ui tailwindcss96```9798```ts99// nuxt.config.ts100export default defineNuxtConfig({101modules: ['@nuxt/ui'],102css: ['~/assets/css/main.css']103})104```105106```css107/* app/assets/css/main.css */108@import "tailwindcss";109@import "@nuxt/ui";110```111112```vue113<!-- app.vue -->114<template>115<UApp>116<NuxtPage />117</UApp>118</template>119```120121### Vue (Vite)122123```bash124pnpm add @nuxt/ui tailwindcss125```126127```ts128// vite.config.ts129import { defineConfig } from 'vite'130import vue from '@vitejs/plugin-vue'131import ui from '@nuxt/ui/vite'132133export default defineConfig({134plugins: [135vue(),136ui()137]138})139```140141```ts142// src/main.ts143import './assets/css/main.css'144import { createApp } from 'vue'145import { createRouter, createWebHistory } from 'vue-router'146import ui from '@nuxt/ui/vue-plugin'147import App from './App.vue'148149const app = createApp(App)150const router = createRouter({151routes: [],152history: createWebHistory()153})154155app.use(router)156app.use(ui)157app.mount('#app')158```159160```css161/* src/assets/css/main.css */162@import "tailwindcss";163@import "@nuxt/ui";164```165166```vue167<!-- src/App.vue -->168<template>169<UApp>170<RouterView />171</UApp>172</template>173```174175> Add `class="isolate"` to your root `<div id="app">` in `index.html`.176> For Inertia: use `ui({ router: 'inertia' })` in `vite.config.ts`.177