```
--------------------------------
### Installation Command
Source: https://shadcn-vue.com/docs/components/kbd
Command to add the Kbd component to your project.
```bash
pnpm dlx shadcn-vue@latest add kbd
```
--------------------------------
### Installation Command
Source: https://shadcn-vue.com/docs/components/button
Command to add the button component to your project.
```bash
pnpm dlx shadcn-vue@latest add button
```
--------------------------------
### Install dependencies
Source: https://shadcn-vue.com/docs/dark-mode/astro
Install the required packages for color mode management and optional icon support.
```bash
pnpm add @vueuse/core
```
```bash
pnpm add -D @iconify/vue @iconify-json/radix-icons
```
--------------------------------
### Install project dependencies
Source: https://shadcn-vue.com/docs/installation/manual
Install the required utility and UI dependencies using your preferred package manager.
```shell
pnpm add class-variance-authority clsx tailwind-merge @lucide/vue tw-animate-css
```
--------------------------------
### Install Item Component
Source: https://shadcn-vue.com/docs/components/item
Use the CLI to add the Item component to your project.
```bash
pnpm dlx shadcn-vue@latest add item
```
--------------------------------
### Serve registry files
Source: https://shadcn-vue.com/docs/registry/getting-started
Start the development server to serve the generated registry files.
```bash
pnpm dev
```
--------------------------------
### Install Icon Dependencies
Source: https://shadcn-vue.com/docs/dark-mode/vite
Install iconify packages to provide theme toggle icons.
```bash
pnpm add -D @iconify/vue @iconify-json/radix-icons
```
--------------------------------
### Install Input OTP via CLI
Source: https://shadcn-vue.com/docs/components/input-otp
Command to add the component to your project.
```bash
pnpm dlx shadcn-vue@latest add input-otp
```
--------------------------------
### Basic Usage Example
Source: https://shadcn-vue.com/docs/components/menubar
A minimal implementation of a single-menu Menubar component.
```vue
File
New Tab ⌘T
New Window
Share
Print
```
--------------------------------
### Install Toggle Component
Source: https://shadcn-vue.com/docs/components/toggle
Use the CLI to add the Toggle component to your project.
```bash
pnpm dlx shadcn-vue@latest add toggle
```
--------------------------------
### Full registry-item.json Example
Source: https://shadcn-vue.com/docs/registry/registry-item-json
A complete example of a registry item definition including metadata and file mappings.
```json
{
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
"name": "hello-world",
"type": "registry:block",
"title": "Hello World",
"description": "A simple hello world component.",
"files": [
{
"path": "registry/new-york/HelloWorld/HelloWorld.vue",
"type": "registry:component"
},
{
"path": "registry/new-york/HelloWorld/useHelloWorld.ts",
"type": "registry:hook"
}
]
}
```
--------------------------------
### Install Textarea Component
Source: https://shadcn-vue.com/docs/components/textarea
Use the CLI to add the Textarea component to your project.
```bash
pnpm dlx shadcn-vue@latest add textarea
```
--------------------------------
### Install Attachment Component
Source: https://shadcn-vue.com/docs/components/attachment
Use the CLI to add the attachment component to your project.
```bash
pnpm dlx shadcn-vue@latest add attachment
```
--------------------------------
### Basic Usage
Source: https://shadcn-vue.com/docs/components/aspect-ratio
A minimal example of implementing the AspectRatio component.
```vue
```
--------------------------------
### Install Dialog Component
Source: https://shadcn-vue.com/docs/components/dialog
Use the CLI to add the Dialog component to your project.
```bash
pnpm dlx shadcn-vue@latest add dialog
```
--------------------------------
### Install Message Component
Source: https://shadcn-vue.com/docs/components/message
Use the CLI to add the Message component to your project.
```bash
pnpm dlx shadcn-vue@latest add message
```
--------------------------------
### Install Sidebar Component
Source: https://shadcn-vue.com/docs/components/sidebar
Use the CLI to add the sidebar component to your project.
```bash
pnpm dlx shadcn-vue@latest add sidebar
```
--------------------------------
### Install Bubble component
Source: https://shadcn-vue.com/docs/components/bubble
Use the CLI to add the Bubble component to your project.
```bash
pnpm dlx shadcn-vue@latest add bubble
```
--------------------------------
### Installation Command
Source: https://shadcn-vue.com/docs/components/select
Command to add the Select component to your project using the shadcn-vue CLI.
```bash
pnpm dlx shadcn-vue@latest add select
```
--------------------------------
### Install Field Component
Source: https://shadcn-vue.com/docs/components/field
Use the CLI to add the Field component to your project.
```bash
pnpm dlx shadcn-vue@latest add field
```
--------------------------------
### Installation Command
Source: https://shadcn-vue.com/docs/components/menubar
Command to add the Menubar component to your project using the shadcn-vue CLI.
```bash
pnpm dlx shadcn-vue@latest add menubar
```
--------------------------------
### Configure Base Color
Source: https://shadcn-vue.com/docs/installation/vite
Example of the interactive prompt for setting the base color in components.json.
```text
Which color would you like to use as base color? › Neutral
```
--------------------------------
### Implement Message Scroller with Provider
Source: https://shadcn-vue.com/docs/components/message-scroller
Full implementation example showing the MessageScroller components and the provider setup for managing a list of messages.
```typescript
File
New Tab ⌘T
New Window ⌘N
New Incognito Window
Share
Email link
Messages
Notes
Print... ⌘P
Edit
Undo ⌘Z
Redo ⇧⌘Z
Find
Search the web
Find...
Find Next
Find Previous
Cut
Copy
Paste
View
Always Show Bookmarks Bar
Always Show Full URLs
Reload ⌘R
Force Reload ⇧⌘R
Toggle Fullscreen
Hide Sidebar
Profiles
Andy
Benoit
Luis
Edit...
Add Profile...
```
--------------------------------
### Install block with primitive overrides
Source: https://shadcn-vue.com/docs/registry/examples
Installs a block while overriding specific primitives using remote registry URLs.
```json
{
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
"name": "custom-login",
"type": "registry:block",
"registryDependencies": [
"Login01",
"https://example.com/r/button.json",
"https://example.com/r/input.json",
"https://example.com/r/label.json"
]
}
```
--------------------------------
### Full Sidebar Demo Implementation
Source: https://shadcn-vue.com/docs/components/sidebar
A complete example integrating SidebarProvider, Sidebar, SidebarInset, and a dynamic menu.
```vue
```
Application
{{ item.title }}
```
```
--------------------------------
### Initialize a new project with pnpm
Source: https://shadcn-vue.com/docs/cli
Initializes a new shadcn-vue project using pnpm.
```bash
pnpm dlx shadcn-vue@latest init
```
--------------------------------
### Install Color Mode Dependency
Source: https://shadcn-vue.com/docs/dark-mode/nuxt
Install the required Nuxt color mode module using your preferred package manager.
```bash
pnpm add -D @nuxtjs/color-mode
```
--------------------------------
### Retrieve project information
Source: https://shadcn-vue.com/docs/cli
Use the info command to display configuration and environment details for the current project.
```bash
pnpm dlx shadcn-vue@latest info
```
--------------------------------
### Group Chat Setup
Source: https://shadcn-vue.com/docs/components/message-scroller
Script setup for a group chat interface, defining types for events and messages with optional scroll anchoring.
```typescript
```
--------------------------------
### Slider Usage Example
Source: https://shadcn-vue.com/docs/components/slider
A minimal implementation of the Slider component.
```vue
```
--------------------------------
### Initialize MCP Server
Source: https://shadcn-vue.com/docs/mcp
Run the initialization command in your project to configure the MCP server for your specific client.
```bash
pnpm dlx shadcn-vue@latest mcp init --client claude
```
--------------------------------
### Create Nuxt Project
Source: https://shadcn-vue.com/docs/installation/nuxt
Initialize a new Nuxt project using the create-nuxt-app command.
```bash
pnpm create nuxt@latest
```
--------------------------------
### KbdGroup API Example
Source: https://shadcn-vue.com/docs/components/kbd
Basic usage of the KbdGroup component.
```vue
Ctrl
B
```
--------------------------------
### Kbd API Example
Source: https://shadcn-vue.com/docs/components/kbd
Basic usage of the Kbd component.
```vue
Ctrl
```
--------------------------------
### Disabled Input Example
Source: https://shadcn-vue.com/docs/components/input
Input field in a disabled state.
```vue
```
--------------------------------
### Basic Skeleton Usage
Source: https://shadcn-vue.com/docs/components/skeleton
A simple example of a rounded skeleton placeholder.
```vue
```
--------------------------------
### Install Context Menu via CLI
Source: https://shadcn-vue.com/docs/components/context-menu
Use the shadcn-vue CLI to add the component to your project.
```bash
pnpm dlx shadcn-vue@latest add context-menu
```
--------------------------------
### Install Drawer via CLI
Source: https://shadcn-vue.com/docs/components/drawer
Use the shadcn-vue CLI to add the Drawer component to your project.
```bash
pnpm dlx shadcn-vue@latest add drawer
```