Loading...
Loading...
Manages shadcn-vue components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn-vue, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn-vue init", "create an app with --preset", or "switch to --preset".
npx skill4agent add unovue/shadcn-vue shadcn-vueIMPORTANT: Run all CLI commands using the project's package runner:,npx shadcn-vue@latest, orpnpm dlx shadcn-vue@latest— based on the project'sbunx --bun shadcn-vue@latest. Examples below usepackageManagerbut substitute the correct runner for the project.npx shadcn-vue@latest
!`npx shadcn-vue@latest info --json`npx shadcn-vue@latest docs <component>npx shadcn-vue@latest searchvariant="outline"size="sm"bg-primarytext-muted-foregroundbg-blue-500classspace-x-*space-y-*flexgap-*flex flex-col gap-*size-*size-10w-10 h-10truncateoverflow-hidden text-ellipsis whitespace-nowrapdark:bg-backgroundtext-muted-foregroundcn()z-indexFieldGroupFielddivspace-y-*grid gap-*InputGroupInputGroupInputInputGroupTextareaInputTextareaInputGroupInputGroupInputGroupAddonToggleGroupButtonFieldSetFieldLegenddivdata-invalidaria-invaliddata-invalidFieldaria-invaliddata-disabledFielddisabledSelectItemSelectGroupDropdownMenuItemDropdownMenuGroupCommandItemCommandGroupDialogTitleSheetTitleDrawerTitleclass="sr-only"CardHeaderCardTitleCardDescriptionCardContentCardFooterCardContentisPendingisLoadingSpinnerdata-icondisabledTabsTriggerTabsListTabsAvatarAvatarFallbackdivAlertEmptyvue-sonnertoast()vue-sonnerSeparator<hr><div class="border-t">Skeletonanimate-pulseBadgeButtondata-icondata-icon="inline-start"data-icon="inline-end"size-4w-4 h-4:icon="CheckIcon"npx shadcn-vue@latest apply <code>npx shadcn-vue@latest init --preset <code><!-- Form layout: FieldGroup + Field, not div + Label. -->
<FieldGroup>
<Field>
<FieldLabel for="email">Email</FieldLabel>
<Input id="email" />
</Field>
</FieldGroup>
<!-- Validation: data-invalid on Field, aria-invalid on the control. -->
<Field data-invalid>
<FieldLabel>Email</FieldLabel>
<Input aria-invalid />
<FieldDescription>Invalid email.</FieldDescription>
</Field>
<!-- Icons in buttons: data-icon, no sizing classes. -->
<Button>
<SearchIcon data-icon="inline-start" />
Search
</Button>
<!-- Spacing: gap-*, not space-y-*. -->
<div class="flex flex-col gap-4"> <!-- correct -->
<div class="space-y-4"> <!-- wrong -->
<!-- Equal dimensions: size-*, not w-* h-*. -->
<Avatar class="size-10"> <!-- correct -->
<Avatar class="w-10 h-10"> <!-- wrong -->
<!-- Status colors: Badge variants or semantic tokens, not raw colors. -->
<Badge variant="secondary">+20.1%</Badge> <!-- correct -->
<span class="text-emerald-600">+20.1%</span> <!-- wrong -->| Need | Use |
|---|---|
| Button/action | |
| Form inputs | |
| Toggle between 2–7 options | |
| Data display | |
| Navigation | |
| Overlays | |
| Feedback | |
| Command palette | |
| Charts | |
| Layout | |
| Empty states | |
| Menus | |
| Tooltips/info | |
aliases@/~/tailwindVersion"v4"@theme inline"v3"tailwind.config.jstailwindCssFilestylenovavegabaserekaiconLibrarylucide-vue-nextlucide@tabler/icons-vuetablerlucide-vue-nextresolvedPathsframeworkpackageManagerpnpm add date-fnsnpm install date-fnsinfonpx shadcn-vue@latest docs <component>npx shadcn-vue@latest docs button dialog selectnpx shadcn-vue@latest docsnpx shadcn-vue@latest infoaddcomponentsresolvedPaths.uinpx shadcn-vue@latest searchnpx shadcn-vue@latest docs <component>npx shadcn-vue@latest viewnpx shadcn-vue@latest add --diffnpx shadcn-vue@latest add--dry-run--diff@/components/ui/...npx shadcn-vue@latest infoui@workspace/ui/componentsSelectItemSelectGroupiconLibrarylucide-vue-nexthugeicons@shadcnnpx shadcn-vue@latest apply <code>npx shadcn-vue@latest init --preset <code> --force --no-reinstallnpx shadcn-vue@latest info--dry-run--diffnpx shadcn-vue@latest init --preset <code> --force --no-reinstallapplycomponents.jsonrekacomponents.json--dry-run--base <current-base>--dry-run--diffnpx shadcn-vue@latest add <component> --dry-runnpx shadcn-vue@latest add <component> --diff <file>--overwrite--overwrite# Create a new project.
npx shadcn-vue@latest init --name my-app --preset nova
npx shadcn-vue@latest init --name my-app --preset a2r6bw --template vite
# Initialize existing project.
npx shadcn-vue@latest init --preset nova
npx shadcn-vue@latest init --defaults # shortcut: --template=nuxt --preset=nova (base style implied)
# Apply a preset to an existing project.
npx shadcn-vue@latest apply a2r6bw
# Add components.
npx shadcn-vue@latest add button card dialog
npx shadcn-vue@latest add --all
# Search registries.
npx shadcn-vue@latest search @shadcn -q "sidebar"
# Get component docs and example URLs.
npx shadcn-vue@latest docs button dialog select
# View registry item details (for items not yet installed).
npx shadcn-vue@latest view @shadcn/buttonnovavegamaialyramiralumanuxtviteastrolaravela2r6bw