shadcn-vue
Original:🇺🇸 English
Not Translated
3 scripts
shadcn-vue for Vue/Nuxt with Reka UI components and Tailwind. Use for accessible UI, Auto Form, data tables, charts, dark mode, MCP server setup, or encountering component imports, Reka UI errors.
3installs
Sourcenoartem/skills
Added on
NPX Install
npx skill4agent add noartem/skills shadcn-vueSKILL.md Content
shadcn-vue
Quick Start (3 Minutes)
For Vue Projects (Vite)
1. Initialize shadcn-vue
bash
npx shadcn-vue@latest initDuring initialization:
- Style: or
New York(cannot change later!)Default - Base color: (recommended)
Slate - CSS variables: (required for dark mode)
Yes
2. Configure TypeScript Path Aliases
json
// tsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}3. Configure Vite
typescript
// vite.config.ts
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import tailwindcss from "@tailwindcss/vite"; // Tailwind v4
import path from "path";
export default defineConfig({
plugins: [vue(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});4. Add Your First Component
bash
npx shadcn-vue@latest add buttonQuick Reference
| Need | Command or file |
|---|---|
| Initialize project | |
| Add component | |
| Add multiple components | |
| Build registry JSON | |
| Generate component docs | |
| Enable CSS variables | |
| Add registry namespace | |
| Opencode MCP init | |
| Codex MCP config | |
Bundled Resources
Templates ():
templates/- - Complete setup guide for Vue/Nuxt with examples (190 lines)
quick-setup.ts
References ():
references/- - CLI commands and options
cli.md - - MCP setup, client configs, prompts
mcp.md - - Theming and
theming.mdcssVariables - - All 7 documented issues with solutions (267 lines)
error-catalog.md - - All 50+ component examples with code
component-examples.md - - Complete dark mode implementation guide
dark-mode-setup.md - - Data tables with TanStack Table
data-tables.md
Component Documentation ():
components/- - Index of all shadcn-vue components
references/components.md - - Individual component documentation with installation, usage, and examples
components/<component>.md
Official Documentation:
- shadcn-vue Docs: https://shadcn-vue.com
- Reka UI Docs: https://reka-ui.com
- GitHub: https://github.com/radix-vue/shadcn-vue
When to Load References
Load these references based on the task:
-
Loadwhen:
references/error-catalog.md- User encounters "component not found" or import errors
- Setup commands fail or configuration issues arise
- Tailwind CSS variables or TypeScript paths broken
- Trigger phrases: "not working", "error", "fails to", "broken"
-
Loadwhen:
references/components.md- User asks what components are available (names, categories, status)
- User needs to add/use a component and wants the correct install/import paths
- You need to confirm a component exists before recommending a custom build
-
Loadwhen:
references/component-examples.md- User asks "how do I implement [component]?"
- Need copy-paste examples for specific components
- Building forms, tables, navigation, or data display
- Trigger phrases: "example", "how to use", "implement", "code sample"
-
Loadwhen:
references/cli.md- User asks how to run the CLI (,
init,add) or what prompts meanupdate - Need the exact command/flags for installing one or more components
- Troubleshooting CLI-related issues (registry, paths, overwrites)
- User asks how to run the CLI (
-
Loadwhen:
references/dark-mode-setup.md- Implementing dark mode / theme switching
- User mentions Vue 3 + Vite, Nuxt, or Astro setup
- Need composable patterns for theme management
- Trigger phrases: "dark mode", "theme", "light/dark", "color scheme"
-
Loadwhen:
references/theming.md- User wants to customize theme tokens via CSS variables (,
cssVariables,:root).dark - Need to wire Tailwind to CSS-variable-based colors and radii
- Setting up/adjusting design tokens (colors, radius, typography) for shadcn-vue
- User wants to customize theme tokens via CSS variables (
-
Loadwhen:
references/mcp.md- Setting up MCP server for opencode, Codex, Cursor, VS Code
- Configuring registries in
components.json - Troubleshooting missing components or registry namespaces
- Trigger phrases: "MCP", "opencode", "codex", "cursor", "registry"
-
Loadwhen:
references/data-tables.md- Building sortable/filterable/paginated tables
- User mentions TanStack Table or
DataTable - Trigger phrases: "data table", "table", "tanstack", "sorting", "pagination"
Critical Rules
Always Do
✅ Run before adding components
init- Creates required configuration and utilities
- Sets up path aliases
✅ Use CSS variables for theming ()
cssVariables: true- Enables dark mode support
- Flexible theme customization
✅ Configure TypeScript path aliases
- Required for component imports
- Must match aliases
components.json
✅ Keep components.json in version control
- Team members need same configuration
- Documents project setup
Never Do
❌ Don't change after initialization
style- Requires complete reinstall
- Reinitialize in new directory instead
❌ Don't mix Radix Vue and Reka UI v2
- Incompatible component APIs
- Use one or the other
❌ Don't skip TypeScript configuration
- Component imports will fail
- IDE autocomplete won't work
❌ Don't use without Tailwind CSS
- Components are styled with Tailwind
- Won't render correctly
Common Mistakes
- Running before
addand missinginit.components.json - Forgetting to enable the MCP server in the client UI/config.
- Mis-typed registry namespaces ().
@namespace/component - Using CSS variable classes without .
tailwind.cssVariables: true
CLI Commands Reference
init Command
bash
# Initialize in current directory
npx shadcn-vue@latest init
# Initialize in specific directory (monorepo)
npx shadcn-vue@latest init -c ./apps/webadd Command
bash
# Add single component
npx shadcn-vue@latest add button
# Add multiple components
npx shadcn-vue@latest add button card dialog
# Add all components
npx shadcn-vue@latest add --alldiff Command
bash
# Check for component updates
npx shadcn-vue@latest diff buttonmcp Command
bash
# Initialize MCP for specific client
npx shadcn-vue@latest mcp init --client opencode
npx shadcn-vue@latest mcp init --client codex
npx shadcn-vue@latest mcp init --client cursor
npx shadcn-vue@latest mcp init --client vscodeConfiguration
shadcn-vue uses to configure:
components.json- Component paths ()
@/components/ui - Utils location ()
@/lib/utils - Tailwind config paths
- TypeScript paths
Full example: See or generate via
templates/components.jsonnpx shadcn-vue@latest initUtils Library
The file provides the helper for merging Tailwind classes:
@/lib/utils.tscn()- Combines multiple className strings
- Uses +
clsxfor conflict resolutiontailwind-merge
Auto-generated by - no manual setup needed.
shadcn-vue init