Skip to content

shadcn-vue: what it is, how to set it up in Vue 3 and Nuxt, and every CLI command

Better Design

Direct answer

shadcn-vue is the Vue port of shadcn/ui: components built on Reka UI and Tailwind CSS that its CLI copies into your Vite, Nuxt, Astro or Laravel project, so you own and edit the code. This guide covers setup in Vue 3, every CLI command and theming, from the project's own docs.

A hand-drawn browser window with shadcn-vue written in it and a short list of what it does.

shadcn-vue gives you the component code, not a package

shadcn-vue is the Vue port of shadcn/ui, open source under the MIT license and maintained by unovue. Its components use Reka UI for behaviour and Tailwind CSS for styles.

Most component libraries ship as an npm package that you import and then override. shadcn-vue copies each component's source into your project instead. To change a button, you edit the button file. Its docs say: this is not a component library, it is how you build your component library.

It is also a way to share components. A set of plain JSON files describes each component, and the CLI installs components across projects, from its own registry, your registry or a GitHub repository.

What you get with shadcn-vue

Components
What it is

72 components, from Accordion and Dialog to Data Table, Sidebar and Stepper

Note

Copied into components/ui in your project

AI Elements
What it is

Chat parts such as Prompt Input, Message, Reasoning and Tool

Note

For apps that show AI output

Forms
What it is

Guides for VeeValidate, TanStack Form and Formisch

Note

One guide per form library

Theming
What it is

CSS variables such as --primary and --primary-foreground

Note

Dark mode overrides the same tokens under .dark

AI tools
What it is

An MCP server and skills for coding agents

Note

Each has its own page in the docs

Frameworks
What it is

Install guides for Vite, Nuxt, Astro, Laravel and a manual setup

Note

RTL support is a CLI option

How to set up shadcn-vue in a Vue 3 project with Vite

The Vite guide has six steps. Create the project with pnpm create vite@latest my-vue-app --template vue-ts and move into it with cd my-vue-app. Then add Tailwind with pnpm add tailwindcss @tailwindcss/vite and replace src/style.css with @import "tailwindcss";.

Next, add "paths": { "@/*": ["./src/*"] } to compilerOptions in both tsconfig.json and tsconfig.app.json. Run pnpm add -D @types/node, then point the @ alias at src in vite.config.ts:

vite.config.ts
import path from 'node:path'
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [vue(), tailwindcss()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
    },
  },
})

Run init, then add your first component

Run pnpm dlx shadcn-vue@latest init. It asks a few questions, such as the base color, writes components.json, installs dependencies, adds the cn helper and sets the CSS variables.

Then run pnpm dlx shadcn-vue@latest add button. The Button lands in src/components/ui/button, and you import it like any of your own files:

App.vue
<script setup lang="ts">
import { Button } from '@/components/ui/button'
</script>

<template>
  <Button>Click me</Button>
</template>

shadcn-vue in four steps

The four steps, in the order you take them.

A hand-drawn four-step path for shadcn-vue: Create the project, Run init, Add components, Customize them.
  1. Step 1: Create the project
  2. Step 2: Run init
  3. Step 3: Add components
  4. Step 4: Customize them

Start a Nuxt, Astro or Laravel project from the CLI

init can also create the project. Pass --template with nuxt, vite, astro or laravel, and --name for the folder, for example pnpm dlx shadcn-vue@latest init --template nuxt --name my-app. The create command does the same as init.

Other init options choose the look: --style (vega, nova, maia, lyra, mira, luma or sera), --icon-library (lucide, tabler, hugeicons, phosphor or remixicon), --font, --base-color and --rtl.

Every shadcn-vue CLI command

init (or create)
What it does

Installs dependencies, adds the cn helper and sets CSS variables

Example

shadcn-vue@latest init

add
What it does

Adds a component and its dependencies; --all adds every one

Example

shadcn-vue@latest add button

view
What it does

Shows a registry item before you install it

Example

shadcn-vue@latest view button card dialog

search (or list)
What it does

Searches one or more registries

Example

shadcn-vue@latest search @shadcn-vue -q "button"

docs
What it does

Prints a component's docs, API and examples in the terminal

Example

shadcn-vue@latest docs button

info
What it does

Prints your project's setup, for debugging

Example

shadcn-vue@latest info

apply
What it does

Applies a preset to an existing project

Example

shadcn-vue@latest apply --preset nova

migrate
What it does

Moves to cn, to another icon library, or to right-to-left support

Example

shadcn-vue@latest migrate rtl

build
What it does

Builds registry JSON files into public/r for your own registry

Example

shadcn-vue@latest build

Change the look with theme tokens

shadcn-vue themes through CSS variables, which is the default (tailwind.cssVariables set to true in components.json). Theme tokens are named color variables. Each surface token pairs with a foreground token: --primary sets the button color and --primary-foreground sets its text.

Tailwind turns the tokens into classes such as bg-background, text-foreground and border-border. Change the values in your CSS under :root and .dark, and every component follows. The shadcn-vue/create page previews colors, radius, fonts and icons and gives you a preset to apply.

Things to know before you use shadcn-vue

  • The components are your code, so upstream fixes do not arrive with an npm update. To take a newer version, add the component again with --overwrite.
  • add --overwrite replaces existing files, including your edits. Commit first so you can compare.
  • init --force overwrites an existing components.json.
  • Each framework needs its own setup; read its install guide before you run init.

Steal this workflow

Run this guide in your own assistant. The prompt carries the guide link and the workflow summary, so the assistant can adapt it to your project.

Read the guide "shadcn-vue: what it is, how to set it up in Vue 3 and Nuxt, and every CLI command" at https://better-design.com/blog/shadcn-vue and help me apply it to my project.

shadcn-vue is the Vue port of shadcn/ui: components built on Reka UI and Tailwind CSS that its CLI copies into your Vite, Nuxt, Astro or Laravel project, so you own and edit the code. This guide covers setup in Vue 3, every CLI command and theming, from the project's own docs.

Start by asking what I am building and which tools I use. Then walk me through the workflow step by step, adapted to my answers.

Claude and ChatGPT open with the prompt filled in. Gemini copies the prompt to your clipboard first, so paste it when the app opens.

Questions

What is shadcn-vue built on?

Reka UI for the component behaviour, styled with Tailwind CSS.

Is shadcn-vue the same as shadcn/ui?

It is the Vue port of shadcn/ui, maintained separately by unovue. It works the same way: the CLI copies component source into your project.

Does shadcn-vue work with Nuxt?

Yes. It has install guides for Nuxt, Vite, Astro and Laravel, and init can create a Nuxt project with --template nuxt.

How do I add a component to shadcn-vue?

Run npx shadcn-vue@latest add followed by the component name, such as button. Use --all to add every component.

How do I update shadcn-vue components?

Run add again for the component with --overwrite. Commit first, because it replaces your edits to that file.

Where these shadcn-vue facts come from

Each fact comes from the pages listed here, read on November 13, 2026. Products change, so check those pages for the current version.

Keep a coding agent on your design

A coding agent such as Claude Code, Cursor or Codex can add shadcn-vue components and build screens with them. Better Design gives that agent a design system, interface principles and review rules, so the result looks designed.