Nuxt Ui

作者 nuxt9c4e33b7e076無授權條款收錄於 2026年10月8日更新於 2026年10月8日

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.

AI 產生的概覽

指導使用 @nuxt/ui v4 元件庫建構 Vue 與 Nuxt 介面,涵蓋主題、表單與頁面版面。

功能
此技能提供使用 @nuxt/ui v4 元件庫建構使用者介面的指引,該元件庫提供以 Tailwind CSS 設計樣式的無障礙 Vue 元件。內容涵蓋語意化色彩主題、元件選擇、表單驗證,以及儀表板、文件網站、聊天與編輯器等整頁版面模式。它也包含 Nuxt 與 Vue(Vite)的安裝說明,並指向用來查詢元件 API 細節的 MCP 伺服器。參考檔案會依任務需要選擇性載入。
適用情境
適用於使用 @nuxt/ui 建立或自訂介面、讓主題符合品牌、建構表單,或組合儀表板、文件網站與聊天介面等版面的情境。鎖定使用 Vite 的 Vue、Nuxt、Laravel(Inertia)與 AdonisJS 專案。
執行需求
需要在 Nuxt、Vue、Laravel 或 AdonisJS 專案中安裝 @nuxt/ui v4 套件與 Tailwind CSS。元件 API 細節依賴 Nuxt UI MCP 伺服器,需要網路存取並在代理用戶端中設定。不附帶指令碼,僅為指示文件與參考檔案。

Nuxt UI

Vue component library built on Reka UI + Tailwind CSS + Tailwind Variants. Works with Nuxt, Vue (Vite), Laravel (Vite + Inertia), and AdonisJS (Vite + Inertia).

MCP Server

For component API details (props, slots, events, full documentation, examples), use the Nuxt UI MCP server. If not already configured, add it:

Cursor — .cursor/mcp.json:

json
{ "mcpServers": { "nuxt-ui": { "type": "http", "url": "https://ui.nuxt.com/mcp" } } }

Claude Code:

bash
claude mcp add --transport http nuxt-ui https://ui.nuxt.com/mcp

Key MCP tools:

  • search-components — find components by name, category, or intent (no params = list all)
  • search-composables — find composables by name or description (no params = list all)
  • search-icons — search Iconify icons (defaults to lucide), returns i-{prefix}-{name} names
  • get-component — full component documentation with usage examples
  • get-component-metadata — props, slots, events (lightweight, no docs content)
  • get-example — real-world code examples

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.

Core rules (always apply)

  1. Always wrap the app in UApp — required for toasts, tooltips, and programmatic overlays. Accepts a locale prop for i18n.
  2. Always use semantic colors — text-default, bg-elevated, border-muted, etc. Never use raw Tailwind palette colors like text-gray-500.
  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.
  4. Override priority (highest wins): ui prop / class prop → global config → theme defaults.
  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.

How to use this skill

Based on the task, load the relevant reference files before writing any code. Don't load everything — only what's needed.

Reference files

Guidelines — design decisions and conventions:

  • design-system [blocked] — semantic colors, theming, brand customization, variants, the ui prop
  • component-selection [blocked] — decision matrices: when to use Modal vs Slideover, Select vs SelectMenu, Toast vs Alert, etc.
  • conventions [blocked] — coding patterns, slot naming, items arrays, composables, keyboard shortcuts
  • forms [blocked] — form validation, field layout, error handling, Standard Schema

Layouts — full page structure patterns:

  • landing [blocked] — landing pages, blog, changelog, pricing
  • dashboard [blocked] — admin UI with sidebar and panels
  • docs [blocked] — documentation sites with navigation and TOC
  • chat [blocked] — AI chat with Vercel AI SDK
  • editor [blocked] — rich text editor with toolbars

Recipes — complete patterns for common tasks:

  • data-tables [blocked] — tables with filters, pagination, sorting, selection
  • auth [blocked] — login, signup, forgot password forms
  • overlays [blocked] — modals, slideovers, drawers, command palette
  • navigation [blocked] — headers, sidebars, breadcrumbs, tabs

Quick reference:

  • components [blocked] — categorized component index for finding the right component name

Routing table

TaskLoad these references
Build a landing pagedesign-system, conventions, landing
Build a dashboard / admin UIconventions, component-selection, dashboard
Add a settings pageconventions, forms
Create a login / signup formconventions, forms, auth
Display data in a tableconventions, component-selection, data-tables
Customize theme / brand colorsdesign-system
Add a chat interfaceconventions, chat
Add a modal, slideover, or drawerconventions, component-selection, overlays
Build site navigationconventions, component-selection, navigation
Build a documentation siteconventions, docs
Render markdowncomponent-selection, components, docs
Add a rich text editorconventions, editor
General UI workconventions, component-selection

Installation

Nuxt

bash
pnpm add @nuxt/ui tailwindcss
ts
// nuxt.config.tsexport default defineNuxtConfig({  modules: ['@nuxt/ui'],  css: ['~/assets/css/main.css']})
css
/* app/assets/css/main.css */@import "tailwindcss";@import "@nuxt/ui";
vue
<!-- app.vue --><template>  <UApp>    <NuxtPage />  </UApp></template>

Vue (Vite)

bash
pnpm add @nuxt/ui tailwindcss
ts
// vite.config.tsimport { defineConfig } from 'vite'import vue from '@vitejs/plugin-vue'import ui from '@nuxt/ui/vite'
export default defineConfig({  plugins: [    vue(),    ui()  ]})
ts
// src/main.tsimport './assets/css/main.css'import { createApp } from 'vue'import { createRouter, createWebHistory } from 'vue-router'import ui from '@nuxt/ui/vue-plugin'import App from './App.vue'
const app = createApp(App)const router = createRouter({  routes: [],  history: createWebHistory()})
app.use(router)app.use(ui)app.mount('#app')
css
/* src/assets/css/main.css */@import "tailwindcss";@import "@nuxt/ui";
vue
<!-- src/App.vue --><template>  <UApp>    <RouterView />  </UApp></template>

Add class="isolate" to your root <div id="app"> in index.html. For Inertia: use ui({ router: 'inertia' }) in vite.config.ts.

來源與署名

來源:nuxt/ui位於skills/nuxt-ui提交9c4e33b

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架