Nuxt + shadcn-vue
Tailwind components copied into your project (built on Reka UI). This page shows exactly what pickstack adds to a Nuxt project for shadcn-vue: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.
$ npm create pickstack@latest my-app -- --framework nuxt --modules shadcn-vue --yesCustomize in the configurator
Packages it adds
| Package | Version | Type |
|---|---|---|
class-variance-authority | ^0.7.1 | runtime |
cn | ^0.5.2 | runtime |
reka-ui | ^2.11.0 | runtime |
shadcn-vue | ^2.9.0 | runtime |
tw-animate-css | ^1.4.0 | runtime |
@tailwindcss/vite | ^4.3.5 | dev |
shadcn-nuxt | ^2.9.0 | dev |
tailwindcss | ^4.3.5 | dev |
New files
<script setup lang="ts">
import { cn } from "cn";
import type { PrimitiveProps } from "reka-ui";
import { Primitive } from "reka-ui";
import type { HTMLAttributes } from "vue";
import type { ButtonVariants } from ".";
import { buttonVariants } from ".";
interface Props extends PrimitiveProps {
variant?: ButtonVariants["variant"];
size?: ButtonVariants["size"];
class?: HTMLAttributes["class"];
}
const props = withDefaults(defineProps<Props>(), {
as: "button",
});
</script>
<template>
<Primitive
data-slot="button"
:data-variant="variant"
:data-size="size"
:as="as"
:as-child="asChild"
:class="cn(buttonVariants({ variant, size }), props.class)"
>
<slot />
</Primitive>
</template>
import type { VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
export { default as Button } from "./Button.vue";
export const buttonVariants = cva(
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*=size-])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
outline:
"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
ghost:
"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
destructive:
"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
link: "text-primary underline-offset-4 hover:underline",
},
size: {
default:
"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*=size-])]:size-3",
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*=size-])]:size-3.5",
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
icon: "size-8",
"icon-xs":
"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*=size-])]:size-3",
"icon-sm":
"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
"icon-lg": "size-9",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
},
);
export type ButtonVariants = VariantProps<typeof buttonVariants>;
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";
const props = withDefaults(
defineProps<{
class?: HTMLAttributes["class"];
size?: "default" | "sm";
}>(),
{
size: "default",
},
);
</script>
<template>
<div
data-slot="card"
:data-size="size"
:class="
cn(
'ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col',
props.class,
)
"
>
<slot />
</div>
</template>
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";
const props = defineProps<{
class?: HTMLAttributes["class"];
}>();
</script>
<template>
<div
data-slot="card-action"
:class="
cn(
'col-start-2 row-span-2 row-start-1 self-start justify-self-end',
props.class,
)
"
>
<slot />
</div>
</template>
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";
const props = defineProps<{
class?: HTMLAttributes["class"];
}>();
</script>
<template>
<div
data-slot="card-content"
:class="cn('px-4 group-data-[size=sm]/card:px-3', props.class)"
>
<slot />
</div>
</template>
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";
const props = defineProps<{
class?: HTMLAttributes["class"];
}>();
</script>
<template>
<div
data-slot="card-description"
:class="cn('text-muted-foreground text-sm', props.class)"
>
<slot />
</div>
</template>
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";
const props = defineProps<{
class?: HTMLAttributes["class"];
}>();
</script>
<template>
<div
data-slot="card-footer"
:class="
cn(
'bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center',
props.class,
)
"
>
<slot />
</div>
</template>
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";
const props = defineProps<{
class?: HTMLAttributes["class"];
}>();
</script>
<template>
<div
data-slot="card-header"
:class="
cn(
'gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]',
props.class,
)
"
>
<slot />
</div>
</template>
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";
const props = defineProps<{
class?: HTMLAttributes["class"];
}>();
</script>
<template>
<div
data-slot="card-title"
:class="
cn(
'text-base leading-snug font-medium group-data-[size=sm]/card:text-sm cn-font-heading',
props.class,
)
"
>
<slot />
</div>
</template>
export { default as Card } from "./Card.vue";
export { default as CardAction } from "./CardAction.vue";
export { default as CardContent } from "./CardContent.vue";
export { default as CardDescription } from "./CardDescription.vue";
export { default as CardFooter } from "./CardFooter.vue";
export { default as CardHeader } from "./CardHeader.vue";
export { default as CardTitle } from "./CardTitle.vue";
export { cn } from "cn";
{
"$schema": "https://shadcn-vue.com/schema.json",
"style": "reka-nova",
"typescript": true,
"tailwind": {
"config": "",
"css": "app/assets/css/main.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide",
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"composables": "@/composables"
}
}
Changes to existing files
<template> <NuxtRouteAnnouncer />+ <main+ class="flex min-h-screen flex-col items-center justify-center gap-8 bg-slate-50 p-8 text-slate-900"+ >+ <nav class="flex gap-4 text-sm font-medium">+ <NuxtLink class="text-slate-600 hover:text-slate-900" to="/">+ Home+ </NuxtLink>+ <NuxtLink class="text-slate-600 hover:text-slate-900" to="/about">+ About+ </NuxtLink>− <main class="app">− <nav class="nav">− <NuxtLink class="link" to="/">Home</NuxtLink>− <NuxtLink class="link" to="/about">About</NuxtLink> </nav> <NuxtPage /> </main>⋯ 2 unchanged lines
+@import "tailwindcss";+@import "tw-animate-css";+@import "shadcn-vue/tailwind.css";−:root {− font-family: system-ui, sans-serif;− color: #0f172a;− background: #f8fafc;−} +@custom-variant dark (&:is(.dark *));−body {− margin: 0;−} +@theme inline {+ --font-heading: var(--font-sans);+ --color-sidebar-ring: var(--sidebar-ring);+ --color-sidebar-border: var(--sidebar-border);+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);+ --color-sidebar-accent: var(--sidebar-accent);+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);+ --color-sidebar-primary: var(--sidebar-primary);+ --color-sidebar-foreground: var(--sidebar-foreground);+ --color-sidebar: var(--sidebar);+ --color-chart-5: var(--chart-5);+ --color-chart-4: var(--chart-4);+ --color-chart-3: var(--chart-3);+ --color-chart-2: var(--chart-2);+ --color-chart-1: var(--chart-1);+ --color-ring: var(--ring);+ --color-input: var(--input);+ --color-border: var(--border);+ --color-destructive: var(--destructive);+ --color-accent-foreground: var(--accent-foreground);+ --color-accent: var(--accent);+ --color-muted-foreground: var(--muted-foreground);+ --color-muted: var(--muted);+ --color-secondary-foreground: var(--secondary-foreground);+ --color-secondary: var(--secondary);+ --color-primary-foreground: var(--primary-foreground);+ --color-primary: var(--primary);+ --color-popover-foreground: var(--popover-foreground);+ --color-popover: var(--popover);+ --color-card-foreground: var(--card-foreground);+ --color-card: var(--card);+ --color-foreground: var(--foreground);+ --color-background: var(--background);+ --radius-sm: calc(var(--radius) * 0.6);+ --radius-md: calc(var(--radius) * 0.8);+ --radius-lg: var(--radius);+ --radius-xl: calc(var(--radius) * 1.4);+ --radius-2xl: calc(var(--radius) * 1.8);+ --radius-3xl: calc(var(--radius) * 2.2);+ --radius-4xl: calc(var(--radius) * 2.6);−.app {− min-height: 100vh;− display: flex;− flex-direction: column;− align-items: center;− justify-content: center;− gap: 2rem;− padding: 2rem;− box-sizing: border-box; } +:root {+ --background: oklch(1 0 0);+ --foreground: oklch(0.145 0 0);+ --card: oklch(1 0 0);+ --card-foreground: oklch(0.145 0 0);+ --popover: oklch(1 0 0);+ --popover-foreground: oklch(0.145 0 0);+ --primary: oklch(0.205 0 0);+ --primary-foreground: oklch(0.985 0 0);+ --secondary: oklch(0.97 0 0);+ --secondary-foreground: oklch(0.205 0 0);+ --muted: oklch(0.97 0 0);+ --muted-foreground: oklch(0.556 0 0);+ --accent: oklch(0.97 0 0);+ --accent-foreground: oklch(0.205 0 0);+ --destructive: oklch(0.577 0.245 27.325);+ --border: oklch(0.922 0 0);+ --input: oklch(0.922 0 0);+ --ring: oklch(0.708 0 0);+ --chart-1: oklch(0.87 0 0);+ --chart-2: oklch(0.556 0 0);+ --chart-3: oklch(0.439 0 0);+ --chart-4: oklch(0.371 0 0);+ --chart-5: oklch(0.269 0 0);+ --radius: 0.625rem;+ --sidebar: oklch(0.985 0 0);+ --sidebar-foreground: oklch(0.145 0 0);+ --sidebar-primary: oklch(0.205 0 0);+ --sidebar-primary-foreground: oklch(0.985 0 0);+ --sidebar-accent: oklch(0.97 0 0);+ --sidebar-accent-foreground: oklch(0.205 0 0);+ --sidebar-border: oklch(0.922 0 0);+ --sidebar-ring: oklch(0.708 0 0);−.title {− font-size: 1.875rem;− margin: 0; } +.dark {+ --background: oklch(0.145 0 0);+ --foreground: oklch(0.985 0 0);+ --card: oklch(0.205 0 0);+ --card-foreground: oklch(0.985 0 0);+ --popover: oklch(0.205 0 0);+ --popover-foreground: oklch(0.985 0 0);+ --primary: oklch(0.922 0 0);+ --primary-foreground: oklch(0.205 0 0);+ --secondary: oklch(0.269 0 0);+ --secondary-foreground: oklch(0.985 0 0);+ --muted: oklch(0.269 0 0);+ --muted-foreground: oklch(0.708 0 0);+ --accent: oklch(0.269 0 0);+ --accent-foreground: oklch(0.985 0 0);+ --destructive: oklch(0.704 0.191 22.216);+ --border: oklch(1 0 0 / 10%);+ --input: oklch(1 0 0 / 15%);+ --ring: oklch(0.556 0 0);+ --chart-1: oklch(0.87 0 0);+ --chart-2: oklch(0.556 0 0);+ --chart-3: oklch(0.439 0 0);+ --chart-4: oklch(0.371 0 0);+ --chart-5: oklch(0.269 0 0);+ --sidebar: oklch(0.205 0 0);+ --sidebar-foreground: oklch(0.985 0 0);+ --sidebar-primary: oklch(0.488 0.243 264.376);+ --sidebar-primary-foreground: oklch(0.985 0 0);+ --sidebar-accent: oklch(0.269 0 0);+ --sidebar-accent-foreground: oklch(0.985 0 0);+ --sidebar-border: oklch(1 0 0 / 10%);+ --sidebar-ring: oklch(0.556 0 0);−.nav {− display: flex;− gap: 1rem; } +@layer base {+ * {+ @apply border-border outline-ring/50;+ }+ body {+ @apply bg-background text-foreground;+ @apply font-sans;+ }−.link {− color: #475569;− text-decoration: none;− font-weight: 500; } −.link:hover {− color: #0f172a;−}− −.page {− display: flex;− flex-direction: column;− align-items: center;− gap: 1.5rem;−}− −.text {− max-width: 28rem;− text-align: center;− color: #475569;−}− −.card {− background: #fff;− padding: 2rem;− border-radius: 1rem;− box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);− text-align: center;−}− −.count {− font-size: 3rem;− font-weight: 700;− margin: 0;− font-variant-numeric: tabular-nums;−}− −.row {− margin-top: 1.5rem;− display: flex;− justify-content: center;− gap: 0.75rem;−}− −.btn {− background: #0f172a;− color: #fff;− border: 0;− border-radius: 0.5rem;− padding: 0.5rem 1rem;− font: inherit;− cursor: pointer;−}− −.btn:hover {− background: #334155;−}−
⋯ 4 unchanged lines </script> <template>+ <Card class="w-72 text-center">+ <CardHeader>+ <CardTitle>Counter</CardTitle>+ </CardHeader>+ <CardContent>+ <p class="text-5xl font-bold tabular-nums">{{ count }}</p>+ </CardContent>+ <CardFooter class="justify-center gap-3">+ <Button variant="outline" @click="count--">-1</Button>+ <Button @click="count++">+1</Button>+ </CardFooter>+ </Card>− <div class="card">− <p class="count">{{ count }}</p>− <div class="row">− <button type="button" class="btn" @click="count--">-1</button>− <button type="button" class="btn" @click="count++">+1</button>− </div>− </div> </template>
<template>+ <section class="flex flex-col items-center gap-6">+ <h1 class="text-3xl font-bold tracking-tight">About</h1>+ <p class="max-w-md text-center text-slate-600">+ Built with Nuxt 4, Vue 3, TypeScript, Tailwind CSS, shadcn-vue.+ </p>− <section class="page">− <h1 class="title">About</h1>− <p class="text">Built with Nuxt 4, Vue 3, TypeScript.</p> </section> </template>
<template>+ <section class="flex flex-col items-center gap-6">+ <h1 class="text-3xl font-bold tracking-tight">my-app</h1>− <section class="page">− <h1 class="title">my-app</h1> <CounterCard /> </section> </template>⋯ 1 unchanged lines
+import tailwindcss from "@tailwindcss/vite";+ // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ compatibilityDate: "2025-07-15", devtools: { enabled: true },+ modules: ["shadcn-nuxt"], css: ["~/assets/css/main.css"],+ vite: { plugins: [tailwindcss()] },+ shadcn: { prefix: "", componentDir: "@/components/ui" }, });
Project files
.gitignoreREADME.mdapp/app.vueapp/assets/css/main.cssapp/components/CounterCard.vueapp/components/ui/button/Button.vueapp/components/ui/button/index.tsapp/components/ui/card/Card.vueapp/components/ui/card/CardAction.vueapp/components/ui/card/CardContent.vueapp/components/ui/card/CardDescription.vueapp/components/ui/card/CardFooter.vueapp/components/ui/card/CardHeader.vueapp/components/ui/card/CardTitle.vueapp/components/ui/card/index.tsapp/lib/utils.tsapp/pages/about.vueapp/pages/index.vuecomponents.jsonnuxt.config.tspackage.jsonpublic/robots.txttsconfig.json