├── .npmrc ├── CODEOWNERS ├── .DS_Store ├── .gitattributes ├── src ├── .DS_Store ├── images │ └── icon.png ├── assets │ ├── .DS_Store │ └── images │ │ ├── .DS_Store │ │ ├── init-cli.png │ │ ├── shadcn-vue-docs.png │ │ ├── add-new-component.png │ │ ├── shadcn-vue-import.png │ │ ├── add-new-components.png │ │ ├── add-multiple-components.png │ │ ├── shadcn-vue-component-docs.png │ │ └── add-multiple-components-preview.png ├── utils │ ├── index.ts │ ├── logs.ts │ ├── registry.ts │ └── vscode.ts ├── snippets │ ├── help.code-snippets │ ├── imports.code-snippets │ └── usage.code-snippets └── extension.ts ├── renovate.json ├── .gitignore ├── .vscodeignore ├── .vscode ├── extensions.json ├── tasks.json ├── settings.json └── launch.json ├── tsup.config.ts ├── .github ├── dependabot.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── tsconfig.json ├── eslint.config.mjs ├── LICENSE ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── package.json ├── README.md ├── CHANGELOG.md └── pnpm-lock.yaml /.npmrc: -------------------------------------------------------------------------------- 1 | --ignore-engines true -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @selemondev -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto -------------------------------------------------------------------------------- /src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/.DS_Store -------------------------------------------------------------------------------- /src/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/images/icon.png -------------------------------------------------------------------------------- /src/assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/assets/.DS_Store -------------------------------------------------------------------------------- /src/assets/images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/assets/images/.DS_Store -------------------------------------------------------------------------------- /src/assets/images/init-cli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/assets/images/init-cli.png -------------------------------------------------------------------------------- /src/assets/images/shadcn-vue-docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/assets/images/shadcn-vue-docs.png -------------------------------------------------------------------------------- /src/assets/images/add-new-component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/assets/images/add-new-component.png -------------------------------------------------------------------------------- /src/assets/images/shadcn-vue-import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/assets/images/shadcn-vue-import.png -------------------------------------------------------------------------------- /src/assets/images/add-new-components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/assets/images/add-new-components.png -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:recommended" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /src/assets/images/add-multiple-components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/assets/images/add-multiple-components.png -------------------------------------------------------------------------------- /src/assets/images/shadcn-vue-component-docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/assets/images/shadcn-vue-component-docs.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | dist 3 | node_modules 4 | .vscode-test/ 5 | *.vsix 6 | .DS_STORE 7 | .env 8 | *.log* 9 | .eslintcache 10 | *.DS_Store 11 | node_modules -------------------------------------------------------------------------------- /src/assets/images/add-multiple-components-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/HEAD/src/assets/images/add-multiple-components-preview.png -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | out/** 4 | node_modules/** 5 | .gitignore 6 | .npmrc 7 | vsc-extension-quickstart.md 8 | **/tsconfig.json 9 | **/.eslintrc.json 10 | **/*.map 11 | **/*.ts 12 | **/.vscode-test.* -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"] 5 | } 6 | -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export const to = async (promise: Promise) => { 2 | try { 3 | const res = await promise; 4 | return [res, null] as const; 5 | } catch (error) { 6 | return [null, error] as const; 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "tsup"; 2 | 3 | export default defineConfig({ 4 | entry: ['./src/extension.ts'], 5 | outDir: "dist", 6 | dts: false, 7 | splitting: false, 8 | clean: true, 9 | platform: 'node', 10 | sourcemap: false, 11 | external: ['vscode'], 12 | noExternal: ['ofetch'] 13 | }) -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "dev", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never", 13 | "group": "watchers" 14 | }, 15 | "group": { 16 | "kind": "build", 17 | "isDefault": true 18 | } 19 | }, 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "npm" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "Node16", 4 | "target": "ES2022", 5 | "lib": [ 6 | "ES2022" 7 | ], 8 | "sourceMap": true, 9 | "rootDir": "src", 10 | "strict": true /* enable all strict type-checking options */ 11 | /* Additional Checks */ 12 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 13 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 14 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. 28 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false, // set this to true to hide the "out" folder with the compiled JS files 5 | "dist": false // set this to true to hide the "dist" folder with the compiled JS files 6 | }, 7 | "search.exclude": { 8 | "out": true, // set this to false to include "out" folder in search results 9 | "dist": true // set this to false to include "dist" folder in search results 10 | }, 11 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts 12 | "typescript.tsc.autoDetect": "off" 13 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /src/snippets/help.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "shadcn/vue help cn": { 3 | "prefix": ["cn-help"], 4 | "body": [ 5 | "// cni-[component] e.g. cni-button", 6 | "import { Button } from \"@/components/ui/button\"", 7 | "", 8 | "// cnx-[component] e.g. cnx-button", 9 | "", 10 | "" 11 | ] 12 | }, 13 | 14 | "shadcn/vue help shadcn": { 15 | "prefix": ["shadcn-help"], 16 | "body": [ 17 | "// shadcn-i-[component] e.g. shadcn-i-button", 18 | "import { Button } from \"@/components/ui/button\"", 19 | "", 20 | "// shadcn-x-[component] e.g. shadcn-x-button", 21 | "", 22 | "" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/utils/logs.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from "vscode"; 2 | import { ofetch } from "ofetch"; 3 | import { type } from "os"; 4 | import { detectPackageManager } from "./vscode"; 5 | 6 | // Endpoint to visualize the mostly used commands, package manager, Operating system and VSCode version. 7 | 8 | const BASE_URL = ""; 9 | 10 | export const logCmd = async (cmd: string) => { 11 | const packageManager = await detectPackageManager(); 12 | const log = { 13 | cmd, 14 | packageManager, 15 | os: type, 16 | vscodeVersion: vscode.version, 17 | }; 18 | 19 | const reqUrl = `${BASE_URL}/api/log`; 20 | await ofetch(reqUrl, { 21 | method: "POST", 22 | headers: { 23 | "Content-Type": "application/json", 24 | authentication: `Bearer ${process.env.BEARER_TOKE}`, 25 | }, 26 | body: JSON.stringify(log), 27 | }); 28 | }; 29 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig, globalIgnores } from "eslint/config"; 2 | import typescriptEslint from "@typescript-eslint/eslint-plugin"; 3 | import tsParser from "@typescript-eslint/parser"; 4 | 5 | export default defineConfig([globalIgnores(["**/out", "**/dist", "**/*.d.ts"]), { 6 | plugins: { 7 | "@typescript-eslint": typescriptEslint, 8 | }, 9 | 10 | languageOptions: { 11 | parser: tsParser, 12 | ecmaVersion: 6, 13 | sourceType: "module", 14 | }, 15 | 16 | rules: { 17 | "@typescript-eslint/naming-convention": ["warn", { 18 | selector: "import", 19 | format: ["camelCase", "PascalCase"], 20 | }], 21 | 22 | "@/semi": "warn", 23 | curly: "warn", 24 | eqeqeq: "warn", 25 | "no-throw-literal": "warn", 26 | semi: "off", 27 | }, 28 | }]); -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Run Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ], 15 | "outFiles": [ 16 | "${workspaceFolder}/dist/**/*.js" 17 | ], 18 | "preLaunchTask": "${defaultBuildTask}" 19 | }, 20 | { 21 | "name": "Extension Tests", 22 | "type": "extensionHost", 23 | "request": "launch", 24 | "args": [ 25 | "--extensionDevelopmentPath=${workspaceFolder}", 26 | "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" 27 | ], 28 | "outFiles": [ 29 | "${workspaceFolder}/out/**/*.js", 30 | "${workspaceFolder}/dist/**/*.js" 31 | ], 32 | "preLaunchTask": "tasks: watch-tests" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 vscode-shadcn-vue and Selemondev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /src/utils/registry.ts: -------------------------------------------------------------------------------- 1 | import { ofetch } from "ofetch"; 2 | import { to } from "./index"; 3 | import { detectPackageManager } from "./vscode"; 4 | 5 | type OgComponent = { 6 | type: "registry:ui"; 7 | name: string; 8 | files: string[]; 9 | dependencies?: string[]; 10 | registryDependencies?: string[]; 11 | }; 12 | 13 | export type Component = { 14 | label: string; 15 | detail?: string; 16 | }; 17 | 18 | export const shadCnDocUrl = "https://shadcn-vue.com/docs"; 19 | 20 | export type Components = Component[]; 21 | 22 | export const getRegistry = async (): Promise => { 23 | const reqUrl = "https://www.shadcn-vue.com/r/index.json"; 24 | const [res, err] = await to(ofetch(reqUrl)); 25 | 26 | if (err || !res) { 27 | return null; 28 | } 29 | 30 | const [data] = await to(res); 31 | 32 | if (!data) { 33 | return null; 34 | } 35 | 36 | const components: Components = (data as OgComponent[]).map((c) => { 37 | const component: Component = { 38 | label: c.name, 39 | detail: `dependencies: ${c.dependencies && c.dependencies.length > 0 ? c.dependencies.join(" ") : "no dependency"}`, 40 | }; 41 | 42 | return component; 43 | }); 44 | 45 | return components; 46 | }; 47 | 48 | export const getInstallCmd = async (components: string[], cwd: string) => { 49 | const packageManager = await detectPackageManager(); 50 | const componentStr = components.join(" "); 51 | 52 | if (packageManager === "bun") { 53 | return `bunx shadcn-vue add ${componentStr} -c ${cwd}`; 54 | } 55 | 56 | if (packageManager === "pnpm") { 57 | return `pnpm dlx shadcn-vue@latest add ${componentStr} -c ${cwd}`; 58 | } 59 | 60 | return `npx shadcn-vue@latest add ${componentStr} -c ${cwd}`; 61 | }; 62 | 63 | export const getInitCmd = async (cwd: string) => { 64 | const packageManager = await detectPackageManager(); 65 | 66 | if (packageManager === "bun") { 67 | return `bunx shadcn-vue@latest init -c ${cwd}`; 68 | } 69 | 70 | if (packageManager === "pnpm") { 71 | return `pnpm dlx shadcn-vue@latest init -c ${cwd}`; 72 | } 73 | 74 | return `npx shadcn-vue@latest init -c ${cwd}`; 75 | }; 76 | 77 | export const getComponentDocLink = (component: string) => { 78 | return `${shadCnDocUrl}/components/${component}`; 79 | }; 80 | -------------------------------------------------------------------------------- /src/utils/vscode.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from "vscode"; 2 | 3 | export type PackageManager = "npm" | "pnpm" | "yarn" | "bun"; 4 | 5 | export const executeCommand = (cmd: string, createNew = true): void => { 6 | let terminal = vscode.window.activeTerminal; 7 | if (createNew || !terminal) { 8 | terminal = vscode.window.createTerminal(); 9 | } 10 | 11 | terminal.show(); 12 | terminal.sendText(cmd); 13 | }; 14 | 15 | export const getFileStat = async (fileName: string) => { 16 | // Get the currently opened workspace folders 17 | const workspaceFolders = vscode.workspace.workspaceFolders; 18 | 19 | if (!workspaceFolders) { 20 | return null; 21 | } 22 | 23 | for (const workspaceFolder of workspaceFolders) { 24 | const filePath = vscode.Uri.joinPath(workspaceFolder.uri, fileName); 25 | try { 26 | const fileMetadata = await vscode.workspace.fs.stat(filePath); 27 | 28 | return fileMetadata; 29 | } catch (error) { 30 | return null; 31 | } 32 | } 33 | }; 34 | 35 | export const detectPackageManager = async (): Promise => { 36 | const lockFiles = ["bun.lock", "bun.lockb"]; 37 | const results = await Promise.all( 38 | lockFiles.map((file) => 39 | getFileStat(file).catch(err => err.code === 'ENOENT' ? false : Promise.reject(err)) 40 | ) 41 | ); 42 | 43 | if (results.some(Boolean)) { 44 | return 'bun'; 45 | } 46 | 47 | const pnpmLockExists = await getFileStat("pnpm-lock.yaml"); 48 | if (pnpmLockExists) { 49 | return "pnpm"; 50 | } 51 | 52 | const yarnLockExists = await getFileStat("yarn.lock"); 53 | if (yarnLockExists) { 54 | return "yarn"; 55 | } 56 | 57 | return "npm"; 58 | }; 59 | 60 | 61 | export const getOrChooseCwd = async (): Promise => { 62 | let cwd = ""; 63 | const prefix = "${workspaceFolder}/"; 64 | 65 | const workspaceFolders = (vscode.workspace.workspaceFolders ?? []).filter( 66 | (f) => f.uri.scheme === "file" 67 | ); 68 | 69 | if (!workspaceFolders.length) { return "./"; } 70 | 71 | const workspacePath = workspaceFolders[0]?.uri.fsPath ?? ""; 72 | const cwdFromConfig = vscode.workspace 73 | .getConfiguration() 74 | .get("terminal.integrated.cwd") 75 | ?.trim(); 76 | 77 | if (cwdFromConfig) { 78 | if (cwdFromConfig.startsWith(prefix)) { 79 | cwd = cwdFromConfig.slice(prefix.length); 80 | } 81 | else if (cwdFromConfig.startsWith(workspacePath)) { 82 | cwd = cwdFromConfig.replace(new RegExp(`^${workspacePath}/?`), ""); 83 | } else { 84 | cwd = cwdFromConfig; 85 | } 86 | 87 | return `${workspacePath}/${cwd}`; 88 | } 89 | 90 | const choice = await vscode.window.showQuickPick( 91 | workspaceFolders.map((f) => f.name) 92 | ); 93 | 94 | if (!choice) { return "./"; } 95 | 96 | return workspaceFolders.find((f) => f.name === choice)?.uri.fsPath ?? "./"; 97 | }; 98 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 2 | # Contributor Covenant Code of Conduct 3 | 4 | ## Our Pledge 5 | 6 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, race, body size, disability, ethnicity, sex characteristics, and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 7 | 8 | ## Our Standards 9 | 10 | Examples of behavior that contributes to creating a positive environment include: 11 | 12 | - Using welcoming and inclusive language 13 | - Being respectful of differing viewpoints and experiences 14 | - Gracefully accepting constructive criticism 15 | - Focusing on what is best for the community 16 | - Showing empathy towards other community members 17 | 18 | Examples of unacceptable behavior by participants include: 19 | 20 | - The use of sexualized language or imagery and unwelcome sexual attention or advances 21 | - Trolling, insulting/derogatory comments, and personal or political attacks 22 | - Public or private harassment 23 | - Publishing others' private information, such as a physical or electronic address, without explicit permission 24 | - Other conduct which could reasonably be considered inappropriate in a professional setting 25 | 26 | ## Our Responsibilities 27 | 28 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 29 | 30 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 31 | 32 | ## Scope 33 | 34 | This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 35 | 36 | ## Enforcement 37 | 38 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at selemondev19@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 39 | 40 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 41 | 42 | ## Attribution 43 | 44 | This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 45 | 46 | For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Thank you for your valuable contribution and dedication to improving this project! We greatly appreciate your involvement. To ensure a smooth and cohesive collaboration, we have provided some guidelines to help you get started. Kindly take a moment to review them before submitting your contributions. Your efforts will undoubtedly make this project even better, and we look forward to working together on its success!. 4 | 5 | ## Code of Conduct 6 | 7 | This project is governed by the [Contributor Covenant Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to adhere to it. 8 | 9 | ## Open Development 10 | 11 | All work happens directly on `GitHub`. Both core team members and external contributors send pull requests which go through the same `code review` process. 12 | 13 | ## Semantic Versioning 14 | 15 | This project follows semantic versioning. We release patch versions for bug fixes or other changes that do not change the behavior of the API, minor versions for new features that are backward-compatible, and major versions for any breaking changes. 16 | 17 | Every significant change is documented in the changelog file. 18 | 19 | ## Reporting Issues 20 | 21 | Welcome to vscode-shadcn-vue! We value your feedback and contributions to make this project better. If you encounter any bugs or have feature requests, please use [Github issues](https://github.com/selemondev/vscode-shadcn-vue/issues) issues to submit them. 22 | 23 | Before reporting an issue, we ask you to: 24 | 25 | 1. `Search for Similar Issues` : Ensure you have searched through our existing issues to see if the problem or feature request has already been addressed or is under discussion. 26 | 27 | 2. `Reproduce the Bug` : If reporting a bug, please provide the minimum code required to reproduce the issue. This will help us understand and resolve the problem more efficiently. 28 | 29 | 3. `Describe Feature Requests` : For feature requests, please describe the desired functionality and any additional context that might be helpful. 30 | 31 | Your participation and attention to these guidelines will help us maintain a more organized and effective development process. 32 | 33 | ## Commit Guidelines 34 | 35 | Commit messages are required to follow the [conventional-changelog standard](https://www.conventionalcommits.org/en/v1.0.0/): 36 | 37 | ```bash 38 | [optional scope]: 39 | 40 | [optional body] 41 | 42 | [optional footer(s)] 43 | ``` 44 | 45 | 👉 [Commit example](https://github.com/unocss/unocss/releases/tag/v0.39.0) 46 | 47 | ### Commit types 48 | 49 | The following is a list of commit types: 50 | 51 | ### Commit Types: 52 | 53 | - `feat`: Adding a new snippet or significant functionality to the vscode-shadcn-vue extension. 54 | 55 | - `fix`: Addressing bugs or issues in existing vscode-shadcn-vue extension. 56 | 57 | - `docs`: Commits related to documentation changes for vscode-shadcn-vue extension. 58 | 59 | - `style`: Commits related to code formatting, styling, or theming of vscode-shadcn-vue extension. 60 | 61 | - `refactor`: Code changes that enhance the library's structure without introducing new features or fixing bugs extension. 62 | 63 | - `perf`: Commits aimed at improving performance for vscode-shadcn-vue extension. 64 | 65 | - `test`: Commits related to testing vscode-shadcn-vue extension. 66 | 67 | - `chore`: Other commits not affecting source or test files directly extension. 68 | 69 | ## License 70 | 71 | By contributing your code to the repository, you agree to license your contribution under the [MIT license](./LICENSE). -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shadcn-vue", 3 | "version": "0.1.0", 4 | "displayName": "shadcn/vue", 5 | "description": "Integrate components and snippets from Shadcn/Vue directly into your IDE.", 6 | "publisher": "Selemondev", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/selemondev/vscode-shadcn-vue" 10 | }, 11 | "bugs": { 12 | "url": "https://github.com/selemondev/vscode-shadcn-vue/issues", 13 | "email": "selemonsrdev@gmail.com" 14 | }, 15 | "engines": { 16 | "vscode": "^1.85.0" 17 | }, 18 | "categories": [ 19 | "Other", 20 | "Snippets" 21 | ], 22 | "keywords": [ 23 | "vue3", 24 | "shadcn-vue", 25 | "shadcn-vue-snippet", 26 | "shadcn-vue-snippets", 27 | "snippet", 28 | "snippets", 29 | "vue snippets", 30 | "shadcn-vue snippets", 31 | "vue 3 typescript snippets" 32 | ], 33 | "icon": "src/images/icon.png", 34 | "galleryBanner": { 35 | "color": "#C80000", 36 | "theme": "dark" 37 | }, 38 | "activationEvents": [], 39 | "main": "./dist/extension.js", 40 | "contributes": { 41 | "snippets": [ 42 | { 43 | "language": "javascript", 44 | "path": "./src/snippets/imports.code-snippets" 45 | }, 46 | { 47 | "language": "typescript", 48 | "path": "./src/snippets/imports.code-snippets" 49 | }, 50 | { 51 | "language": "html", 52 | "path": "./src/snippets/help.code-snippets" 53 | }, 54 | { 55 | "language": "javascript", 56 | "path": "./src/snippets/help.code-snippets" 57 | }, 58 | { 59 | "language": "typescript", 60 | "path": "./src/snippets/help.code-snippets" 61 | }, 62 | { 63 | "language": "html", 64 | "path": "./src/snippets/usage.code-snippets" 65 | }, 66 | { 67 | "language": "vue-html", 68 | "path": "./src/snippets/usage.code-snippets" 69 | } 70 | ], 71 | "commands": [ 72 | { 73 | "command": "shadcn-vue.initCli", 74 | "title": "shadcn/vue: Install CLI" 75 | }, 76 | { 77 | "command": "shadcn-vue.addNewComponent", 78 | "title": "shadcn/vue: Add New Component" 79 | }, 80 | { 81 | "command": "shadcn-vue.addMultipleComponents", 82 | "title": "shadcn/vue: Add Multiple Components" 83 | }, 84 | { 85 | "command": "shadcn-vue.gotoComponentDoc", 86 | "title": "shadcn/vue: Open Component Documentation" 87 | }, 88 | { 89 | "command": "shadcn-vue.reloadComponentList", 90 | "title": "shadcn/vue: Reload Component List" 91 | }, 92 | { 93 | "command": "shadcn-vue.gotoDoc", 94 | "title": "shadcn/vue: Open Documentation" 95 | } 96 | ] 97 | }, 98 | "scripts": { 99 | "vscode:prepublish": "pnpm build", 100 | "generate:release": "npx changelogen@latest --release", 101 | "build": "tsup", 102 | "dev": "pnpm build -- --watch", 103 | "vscode": "pnpx vsce publish --no-dependencies", 104 | "ovsx": "pnpx ovsx publish --no-dependencies", 105 | "lint": "eslint src --ext ts" 106 | }, 107 | "devDependencies": { 108 | "@types/node": "24.6.0", 109 | "@types/vscode": "^1.85.0", 110 | "@typescript-eslint/eslint-plugin": "^8.43.0", 111 | "@typescript-eslint/parser": "^8.45.0", 112 | "eslint": "^9.39.1", 113 | "tsup": "^8.5.0", 114 | "typescript": "^5.9.2" 115 | }, 116 | "dependencies": { 117 | "ofetch": "^1.4.1" 118 | }, 119 | "packageManager": "pnpm@10.18.3+sha512.bbd16e6d7286fd7e01f6b3c0b3c932cda2965c06a908328f74663f10a9aea51f1129eea615134bf992831b009eabe167ecb7008b597f40ff9bc75946aadfb08d" 120 | } -------------------------------------------------------------------------------- /src/extension.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from "vscode"; 2 | 3 | import { 4 | getInitCmd, 5 | getInstallCmd, 6 | getComponentDocLink, 7 | getRegistry, 8 | shadCnDocUrl, 9 | } from "./utils/registry"; 10 | import { executeCommand, getOrChooseCwd } from "./utils/vscode"; 11 | import type { Components, Component } from "./utils/registry"; 12 | 13 | const commands = { 14 | initCli: "shadcn-vue.initCli", 15 | addNewComponent: "shadcn-vue.addNewComponent", 16 | addMultipleComponents: "shadcn-vue.addMultipleComponents", 17 | gotoComponentDoc: "shadcn-vue.gotoComponentDoc", 18 | reloadComponentList: "shadcn-vue.reloadComponentList", 19 | gotoDoc: "shadcn-vue.gotoDoc", 20 | } as const; 21 | 22 | export function activate(context: vscode.ExtensionContext) { 23 | let registryData: Components; 24 | 25 | const disposables: vscode.Disposable[] = [ 26 | vscode.commands.registerCommand(commands.initCli, async () => { 27 | const cwd = await getOrChooseCwd(); 28 | const intCmd = await getInitCmd(cwd); 29 | executeCommand(intCmd); 30 | }), 31 | vscode.commands.registerCommand(commands.addNewComponent, async () => { 32 | if (!registryData) { 33 | const newRegistryData = await getRegistry(); 34 | 35 | if (!newRegistryData) { 36 | vscode.window.showErrorMessage("Can not get the component list"); 37 | return; 38 | } 39 | 40 | registryData = newRegistryData; 41 | } 42 | 43 | const selectedComponent = await vscode.window.showQuickPick(registryData, { 44 | matchOnDescription: true, 45 | }); 46 | 47 | if (!selectedComponent) { 48 | return; 49 | } 50 | const cwd = await getOrChooseCwd(); 51 | const installCmd = await getInstallCmd([selectedComponent.label], cwd); 52 | executeCommand(installCmd); 53 | }), 54 | 55 | vscode.commands.registerCommand(commands.addMultipleComponents, async () => { 56 | if (!registryData) { 57 | const newRegistryData = await getRegistry(); 58 | 59 | if (!newRegistryData) { 60 | vscode.window.showErrorMessage("Can not get the component list"); 61 | return; 62 | } 63 | 64 | registryData = newRegistryData; 65 | } 66 | 67 | const selectedComponents = await vscode.window.showQuickPick(registryData, { 68 | matchOnDescription: true, 69 | canPickMany: true, 70 | }); 71 | 72 | if (!selectedComponents) { 73 | return; 74 | } 75 | 76 | const selectedComponent = selectedComponents.map((component: Component) => component.label); 77 | const cwd = await getOrChooseCwd(); 78 | const installCmd = await getInstallCmd(selectedComponent, cwd); 79 | executeCommand(installCmd); 80 | }), 81 | vscode.commands.registerCommand(commands.gotoComponentDoc, async () => { 82 | if (!registryData) { 83 | const newRegistryData = await getRegistry(); 84 | 85 | if (!newRegistryData) { 86 | vscode.window.showErrorMessage("Can not get the component list"); 87 | return; 88 | } 89 | 90 | registryData = newRegistryData; 91 | } 92 | 93 | const selectedComponent = await vscode.window.showQuickPick(registryData, { 94 | matchOnDescription: true, 95 | }); 96 | 97 | if (!selectedComponent) { 98 | return; 99 | } 100 | 101 | const componentDocLink = getComponentDocLink(selectedComponent.label); 102 | vscode.env.openExternal(vscode.Uri.parse(componentDocLink)); 103 | }), 104 | vscode.commands.registerCommand(commands.reloadComponentList, async () => { 105 | const newRegistryData = await getRegistry(); 106 | 107 | if (!newRegistryData) { 108 | vscode.window.showErrorMessage("Can not get the component list"); 109 | return; 110 | } 111 | 112 | registryData = newRegistryData; 113 | vscode.window.showInformationMessage("shadcn/vue: Reloaded components"); 114 | }), 115 | vscode.commands.registerCommand(commands.gotoDoc, async () => { 116 | vscode.env.openExternal(vscode.Uri.parse(shadCnDocUrl)); 117 | }), 118 | ]; 119 | 120 | context.subscriptions.push(...disposables); 121 | } 122 | 123 | // This method is called when your extension is deactivated 124 | export function deactivate() { } 125 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | shadcn-vue 5 |

6 |

7 | 8 | This VSCode extension enables you to install [shadcn/vue](https://shadcn-vue.com) components directly from your IDE ✨. 9 | 10 | ## Initialize the Shadcn/Vue CLI. 11 | 12 | ![to initialize CLI open the command palette and search for shadcn/vue: install cli command](https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/master/src/assets/images/init-cli.png) 13 | 14 | ## Install components. 15 | 16 | ![to initialize CLI open the command palette and search for shadcn/vue: add new component](https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/master/src/assets/images/add-new-component.png) 17 | 18 | 19 | ## Choose a component to install from the list. 20 | 21 | ![choose a component to install from the list](https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/master/src/assets/images/add-new-components.png) 22 | 23 | ## Install multiple components. 24 | ![install multiple components](https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/master/src/assets/images/add-multiple-components.png) 25 | 26 | ## Choose components to install from the list. 27 | ![choose components to install from the list](https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/master/src/assets/images/add-multiple-components-preview.png) 28 | 29 | 30 | ## Open the Shadcn-Vue documentation. 31 | 32 | ![open the shadcn-vue documentation](https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/master/src/assets/images/shadcn-vue-docs.png) 33 | 34 | 35 | ## Navigate to a particular component's documentation page. 36 | 37 | ![navigate to a particular component's documentation page](https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/master/src/assets/images/shadcn-vue-component-docs.png) 38 | 39 | 40 | 41 | ## Shadcn/Vue Snippets 42 | 43 | Easily import and use shadcn-vue components with ease using snippets within VSCode. Just type `cn` or `shadcn` in your vue file and choose from an array of components to use. 44 | 45 | ![shadcn-vue-snippets-example](https://raw.githubusercontent.com/selemondev/vscode-shadcn-vue/master/src/assets/images/shadcn-vue-import.png) 46 | 47 | 48 | ### How it works 49 | 50 | | Snippet | Description | 51 | | ----------------- | -------------------------------------- | 52 | | `cn-help` | How to use shadcn/vue snippets | 53 | | `cni-[component]` | Adds imports for the component | 54 | | `cnx-[component]` | Adds the template for the vue component| 55 | 56 | ### How to use? 57 | 58 | 1. Components 59 | 60 | For `Alert` component, type `cni-alert` to add imports in your vue file, and to use the component, use `cnx-alert`. 61 | 62 | > Similarly, for any other component, use `cni-[component]` to add imports and `cnx-[component]` to use. 63 | 64 | ```tsx 65 | // cni-alert 66 | import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert" 67 | 68 | // cnx-alert 69 | 70 | Heads up! 71 | 72 | You can add components using the Shadcn/Vue VSCode extension. 73 | 74 | ; 75 | ``` 76 | 77 | ### How to contribute? 78 | 79 | Contributions are welcome and encouraged! If you have any ideas or suggestions for new features, or if you encounter any bugs or issues, please open an issue or submit a pull request on the GitHub repository. 80 | 81 | Developers interested in contributing should read the [Code of Conduct](./CODE_OF_CONDUCT.md) and the [Contributing Guide](./CONTRIBUTING.md). 82 | 83 | Use this link - [Snippet Generation](https://snippet-generator.app/?description=https://shadcn-vue.com/docs/components&tabtrigger=shadcn-&snippet=%22https://shadcn-vue.com/docs/components%22:+%7B%0A++%22prefix%22:+%22shadcn-%22,%0A++%22body%22:+%5B%0A++%5D,%0A++%22description%22:+%22https://shadcn-vue.com/docs/components%22%0A%7D&mode=vscode) to generate snippets and add/update them to the `snippets` folder that is located in the `src` accordingly. 84 | 85 | 86 | ### Credits 87 | 88 | All credits go to these amazing developers 89 | 90 | - [Shadcn UI](https://ui.shadcn.com) for creating this beautiful project. 91 | - [Shadcn Vue](https://shadcn-vue.com) for creating the Vue port of Shadcn UI. 92 | - [Radix Vue](https://radix-vue.com) for doing all the hard work to make sure components are accessible. 93 | - [VueUse](https://vueuse.org) for providing many useful utilities. 94 | - [Suhel Makkad](https://github.com/SuhelMakkad/vscode-shadcn-ui) for creating the Shadcn UI VSCode extension. 95 | - [Neeraj Dalal](https://github.com/nrjdalal/shadcn-ui-snippets) for creating the Shadcn UI Snippets VSCode extension. 96 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "shadcn-vue" extension will be documented in this file. 4 | 5 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 6 | 7 | ## v0.1.0 8 | 9 | [compare changes](https://github.com/selemondev/vscode-shadcn-vue/compare/v0.0.11...v0.1.0) 10 | 11 | ### 🩹 Fixes 12 | 13 | - User's cwd preference ([73d5b84](https://github.com/selemondev/vscode-shadcn-vue/commit/73d5b84)) 14 | 15 | ### 🏡 Chore 16 | 17 | - Set npm as the package ecosystem for Dependabot ([c256cb9](https://github.com/selemondev/vscode-shadcn-vue/commit/c256cb9)) 18 | - **deps-dev:** Bump tsup from 8.0.1 to 8.5.0 ([17deab4](https://github.com/selemondev/vscode-shadcn-vue/commit/17deab4)) 19 | - **deps-dev:** Bump @types/vscode from 1.86.0 to 1.103.0 ([246dec3](https://github.com/selemondev/vscode-shadcn-vue/commit/246dec3)) 20 | - **deps-dev:** Bump @types/node from 20.2.5 to 24.3.1 ([82b4682](https://github.com/selemondev/vscode-shadcn-vue/commit/82b4682)) 21 | - **deps-dev:** Bump typescript from 5.3.3 to 5.9.2 ([4ecfe75](https://github.com/selemondev/vscode-shadcn-vue/commit/4ecfe75)) 22 | - **deps-dev:** Bump @types/node from 24.3.1 to 24.5.2 ([c01670e](https://github.com/selemondev/vscode-shadcn-vue/commit/c01670e)) 23 | - **deps-dev:** Bump @types/node from 24.5.2 to 24.6.0 ([c6289ea](https://github.com/selemondev/vscode-shadcn-vue/commit/c6289ea)) 24 | - **package.json:** Update dependencies ([22ffb67](https://github.com/selemondev/vscode-shadcn-vue/commit/22ffb67)) 25 | - **eslint:** Migrate to Eslint v9 file structure ([47545ca](https://github.com/selemondev/vscode-shadcn-vue/commit/47545ca)) 26 | - Update settings.json ([4d8dbb2](https://github.com/selemondev/vscode-shadcn-vue/commit/4d8dbb2)) 27 | 28 | ### ❤️ Contributors 29 | 30 | - Selemondev 31 | - Selemon Brahanu ([@selemondev](https://github.com/selemondev)) 32 | 33 | ## v0.0.11 34 | 35 | [compare changes](https://github.com/selemondev/vscode-shadcn-vue/compare/v0.0.10...v0.0.11) 36 | 37 | ### 🏡 Chore 38 | 39 | - Add vue-html language for usage snippet ([562012d](https://github.com/selemondev/vscode-shadcn-vue/pull/37)) 40 | 41 | ### ❤️ Contributors 42 | 43 | - [Misbah Ansori](@misbahansori) 44 | 45 | ## v0.0.10 46 | 47 | [compare changes](https://github.com/selemondev/vscode-shadcn-vue/compare/v0.0.9...v0.0.10) 48 | 49 | ### 💅 Refactors 50 | 51 | - Bun-lock file ([00699b1](https://github.com/selemondev/vscode-shadcn-vue/commit/00699b1)) 52 | 53 | ### 🏡 Chore 54 | 55 | - Release ([4109d7b](https://github.com/selemondev/vscode-shadcn-vue/commit/4109d7b)) 56 | - Add deployment scripts ([0cd39c9](https://github.com/selemondev/vscode-shadcn-vue/commit/0cd39c9)) 57 | 58 | ### ❤️ Contributors 59 | 60 | - Selemondev 61 | 62 | ## v0.0.6 63 | 64 | [compare changes](https://github.com/selemondev/vscode-shadcn-vue/compare/v0.0.5...v0.0.6) 65 | 66 | ### 🚀 Enhancements 67 | 68 | - **snippets:** Add Sonner snippets ([5711055](https://github.com/selemondev/vscode-shadcn-vue/commit/5711055)) 69 | - **snippets:** Add Carousel snippets ([0eb3f8b](https://github.com/selemondev/vscode-shadcn-vue/commit/0eb3f8b)) 70 | 71 | ### 💅 Refactors 72 | 73 | - Use getInstallCmd function ([f1e4f58](https://github.com/selemondev/vscode-shadcn-vue/commit/f1e4f58)) 74 | - **bundler:** Migrate from webpack to tsup ([e086953](https://github.com/selemondev/vscode-shadcn-vue/commit/e086953)) 75 | 76 | ### 📖 Documentation 77 | 78 | - Update README.md ([db25930](https://github.com/selemondev/vscode-shadcn-vue/commit/db25930)) 79 | 80 | ### 🏡 Chore 81 | 82 | - **release:** V0.0.4 ([634aab6](https://github.com/selemondev/vscode-shadcn-vue/commit/634aab6)) 83 | - **release:** V0.0.5 ([727bf3d](https://github.com/selemondev/vscode-shadcn-vue/commit/727bf3d)) 84 | - Use help-code snippets in script block ([7d8faa8](https://github.com/selemondev/vscode-shadcn-vue/commit/7d8faa8)) 85 | - Use getInstallCmd function ([4dd7a07](https://github.com/selemondev/vscode-shadcn-vue/commit/4dd7a07)) 86 | - . ([1a4a27a](https://github.com/selemondev/vscode-shadcn-vue/commit/1a4a27a)) 87 | 88 | ### ❤️ Contributors 89 | 90 | - Selemondev 91 | 92 | ## v0.0.5 93 | 94 | [compare changes](https://github.com/selemondev/vscode-shadcn-vue/compare/v0.0.4...v0.0.5) 95 | 96 | ### 📖 Documentation 97 | 98 | - Update README file ([ed975af](https://github.com/selemondev/vscode-shadcn-vue/commit/ed975af)) 99 | 100 | ### 🏡 Chore 101 | 102 | - Release v0.0.3 ([acabf7d](https://github.com/selemondev/vscode-shadcn-vue/commit/acabf7d)) 103 | - **release:** V0.0.4 ([634aab6](https://github.com/selemondev/vscode-shadcn-vue/commit/634aab6)) 104 | 105 | ### ❤️ Contributors 106 | 107 | - Selemondev 108 | 109 | ## v0.0.4 110 | 111 | [compare changes](https://github.com/selemondev/vscode-shadcn-vue/compare/v0.0.4...v0.0.4) 112 | 113 | ### 📖 Documentation 114 | 115 | - Update README file ([ed975af](https://github.com/selemondev/vscode-shadcn-vue/commit/ed975af)) 116 | 117 | ### 🏡 Chore 118 | 119 | - Release v0.0.3 ([acabf7d](https://github.com/selemondev/vscode-shadcn-vue/commit/acabf7d)) 120 | 121 | ### ❤️ Contributors 122 | 123 | - Selemondev 124 | 125 | ## v0.0.4 126 | 127 | [compare changes](https://github.com/selemondev/vscode-shadcn-vue/compare/v0.0.2...v0.0.4) 128 | 129 | ### 🚀 Enhancements 130 | 131 | - Add issue templates ([cf6fc5c](https://github.com/selemondev/vscode-shadcn-vue/commit/cf6fc5c)) 132 | - Add multiple components ([76bfa7b](https://github.com/selemondev/vscode-shadcn-vue/commit/76bfa7b)) 133 | 134 | ### 🏡 Chore 135 | 136 | - **release:** V0.0.2 ([c66297b](https://github.com/selemondev/vscode-shadcn-vue/commit/c66297b)) 137 | - Add codeowners ([982e047](https://github.com/selemondev/vscode-shadcn-vue/commit/982e047)) 138 | - Remove console logs ([404399c](https://github.com/selemondev/vscode-shadcn-vue/commit/404399c)) 139 | - Bumpp version ([c910cb6](https://github.com/selemondev/vscode-shadcn-vue/commit/c910cb6)) 140 | 141 | ### ❤️ Contributors 142 | 143 | - Selemondev 144 | 145 | ## v0.0.2 146 | 147 | 148 | ### 📖 Documentation 149 | 150 | - Update docs ([5cabe2f](https://github.com/selemondev/vscode-shadcn-vue/commit/5cabe2f)) 151 | - Update docs ([11ffb8b](https://github.com/selemondev/vscode-shadcn-vue/commit/11ffb8b)) 152 | 153 | ### 🏡 Chore 154 | 155 | - Add files to .gitignore ([d85f78b](https://github.com/selemondev/vscode-shadcn-vue/commit/d85f78b)) 156 | - Remove tests ([44d5e10](https://github.com/selemondev/vscode-shadcn-vue/commit/44d5e10)) 157 | 158 | ### ❤️ Contributors 159 | 160 | - Selemondev 161 | 162 | ## [Unreleased] 163 | 164 | - Initial release -------------------------------------------------------------------------------- /src/snippets/imports.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "Accordion": { 3 | "prefix": ["shadcn-i-accordion", "cni-accordion"], 4 | "body": [ 5 | "import {", 6 | " Accordion,", 7 | " AccordionContent,", 8 | " AccordionItem,", 9 | " AccordionTrigger,", 10 | "} from \"@/components/ui/accordion\"", 11 | "" 12 | ], 13 | "description": "https://shadcn-vue.com/docs/components" 14 | }, 15 | 16 | "Alert": { 17 | "prefix": ["shadcn-i-alert", "cni-alert"], 18 | "body": [ 19 | "import { Alert, AlertDescription, AlertTitle } from \"@/components/ui/alert\"", 20 | "" 21 | ], 22 | "description": "https://shadcn-vue.com/docs/components/alert.html" 23 | }, 24 | 25 | "Alert Dialog": { 26 | "prefix": ["shadcn-i-alert-dialog", "cni-alert-dialog"], 27 | "body": [ 28 | "import {", 29 | " AlertDialog,", 30 | " AlertDialogAction,", 31 | " AlertDialogCancel,", 32 | " AlertDialogContent,", 33 | " AlertDialogDescription,", 34 | " AlertDialogFooter,", 35 | " AlertDialogHeader,", 36 | " AlertDialogTitle,", 37 | " AlertDialogTrigger,", 38 | "} from \"@/components/ui/alert-dialog\"", 39 | "" 40 | ], 41 | "description": "https://shadcn-vue.com/docs/components/alert-dialog.html" 42 | }, 43 | 44 | "Aspect Ratio": { 45 | "prefix": ["shadcn-i-aspect-ratio", "cni-aspect-ratio"], 46 | "body": [ 47 | "import { AspectRatio } from \"@/components/ui/aspect-ratio\"", 48 | "" 49 | ], 50 | "description": "https://shadcn-vue.com/docs/components/aspect-ratio.html" 51 | }, 52 | 53 | "Avatar": { 54 | "prefix": ["shadcn-i-avatar", "cni-avatar"], 55 | "body": [ 56 | "import { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"", 57 | "" 58 | ], 59 | "description": "https://shadcn-vue.com/docs/components/avatar.html" 60 | }, 61 | 62 | "Badge": { 63 | "prefix": ["shadcn-i-badge", "cni-badge"], 64 | "body": ["import { Badge } from \"@/components/ui/badge\"", ""], 65 | "description": "https://shadcn-vue.com/docs/components/badge.html" 66 | }, 67 | 68 | "Button": { 69 | "prefix": ["shadcn-i-button", "cni-button"], 70 | "body": ["import { Button } from \"@/components/ui/button\"", ""], 71 | "description": "https://shadcn-vue.com/docs/components/button.html" 72 | }, 73 | 74 | "Calendar": { 75 | "prefix": ["shadcn-i-calendar", "cni-calendar"], 76 | "body": [ 77 | "import { Calendar } from \"@/components/ui/calendar\"", 78 | "" 79 | ], 80 | "description": "https://shadcn-vue.com/docs/components/calendar.html" 81 | }, 82 | 83 | "Card": { 84 | "prefix": ["shadcn-i-card", "cni-card"], 85 | "body": [ 86 | "import {", 87 | " Card,", 88 | " CardContent,", 89 | " CardDescription,", 90 | " CardFooter,", 91 | " CardHeader,", 92 | " CardTitle,", 93 | "} from \"@/components/ui/card\"", 94 | "" 95 | ], 96 | "description": "https://shadcn-vue.com/docs/components/card.html" 97 | }, 98 | 99 | "Carousel": { 100 | "prefix": ["shadcn-i-carousel", "cni-carousel"], 101 | "body": [ 102 | "import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from '@/components/ui/carousel'", 103 | "import { Card, CardContent } from '@/components/ui/card'" 104 | ], 105 | "description": "https://shadcn-vue.com/docs/components/carousel.html" 106 | }, 107 | 108 | "Checkbox": { 109 | "prefix": ["shadcn-i-checkbox", "cni-checkbox"], 110 | "body": ["import { Checkbox } from \"@/components/ui/checkbox\"", ""], 111 | "description": "https://shadcn-vue.com/docs/components/checkbox.html" 112 | }, 113 | 114 | "Collapsible": { 115 | "prefix": ["shadcn-i-collapsible", "cni-collapsible"], 116 | "body": [ 117 | "import {", 118 | " Collapsible,", 119 | " CollapsibleContent,", 120 | " CollapsibleTrigger,", 121 | "} from \"@/components/ui/collapsible\"", 122 | "" 123 | ], 124 | "description": "https://shadcn-vue.com/docs/components/collapsible.html" 125 | }, 126 | 127 | "Command": { 128 | "prefix": ["shadcn-i-command", "cni-command"], 129 | "body": [ 130 | "import {", 131 | " Command,", 132 | " CommandDialog,", 133 | " CommandEmpty,", 134 | " CommandGroup,", 135 | " CommandInput,", 136 | " CommandItem,", 137 | " CommandList,", 138 | " CommandSeparator,", 139 | " CommandShortcut,", 140 | "} from \"@/components/ui/command\"", 141 | "" 142 | ], 143 | "description": "https://shadcn-vue.com/docs/components/command.html" 144 | }, 145 | 146 | "Context Menu": { 147 | "prefix": ["shadcn-i-context-menu", "cni-context-menu"], 148 | "body": [ 149 | "import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from \"@/components/ui/context-menu\"", 150 | "" 151 | ], 152 | "description": "https://shadcn-vue.com/docs/components/context-menu.html" 153 | }, 154 | 155 | "Dialog": { 156 | "prefix": ["shadcn-i-dialog", "cni-dialog"], 157 | "body": [ 158 | "import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from \"@/components/ui/dialog\"", 159 | "" 160 | ], 161 | "description": "https://shadcn-vue.com/docs/components/dialog.html" 162 | }, 163 | 164 | "Drawer": { 165 | "prefix": ["shadcn-i-drawer", "cni-drawer"], 166 | "body": [ 167 | "import {", 168 | " Drawer,", 169 | " DrawerClose,", 170 | " DrawerContent,", 171 | " DrawerDescription,", 172 | " DrawerFooter,", 173 | " DrawerHeader,", 174 | " DrawerTitle,", 175 | " DrawerTrigger,", 176 | "} from '@/components/ui/drawer'" 177 | ], 178 | "description": "https://shadcn-vue.com/docs/components/drawer.html" 179 | }, 180 | 181 | 182 | "Dropdown Menu": { 183 | "prefix": ["shadcn-i-dropdown-menu", "cni-dropdown-menu"], 184 | "body": [ 185 | "import {", 186 | " DropdownMenu,", 187 | " DropdownMenuContent,", 188 | " DropdownMenuGroup,", 189 | " DropdownMenuItem,", 190 | " DropdownMenuLabel,", 191 | " DropdownMenuPortal,", 192 | " DropdownMenuSeparator,", 193 | " DropdownMenuShortcut,", 194 | " DropdownMenuSub,", 195 | " DropdownMenuSubContent,", 196 | " DropdownMenuSubTrigger,", 197 | " DropdownMenuTrigger,", 198 | "} from \"@/components/ui/dropdown-menu\"", 199 | "" 200 | ], 201 | "description": "https://shadcn-vue.com/docs/components/dropdown-menu.html" 202 | }, 203 | 204 | "Hover Card": { 205 | "prefix": ["shadcn-i-hover-card", "cni-hover-card"], 206 | "body": [ 207 | "import {", 208 | " HoverCard,", 209 | " HoverCardContent,", 210 | " HoverCardTrigger,", 211 | "} from \"@/components/ui/hover-card\"", 212 | "" 213 | ], 214 | "description": "https://shadcn-vue.com/docs/components/hover-card.html" 215 | }, 216 | 217 | "Input": { 218 | "prefix": ["shadcn-i-input", "cni-input"], 219 | "body": ["import { Input } from \"@/components/ui/input\"", ""], 220 | "description": "https://shadcn-vue.com/docs/components/input.html" 221 | }, 222 | 223 | "Label": { 224 | "prefix": ["shadcn-i-label", "cni-label"], 225 | "body": ["import { Label } from \"@/components/ui/label\"", ""], 226 | "description": "https://shadcn-vue.com/docs/components/label.html" 227 | }, 228 | 229 | "Menubar": { 230 | "prefix": ["shadcn-i-menubar", "cni-menubar"], 231 | "body": [ 232 | "import {", 233 | " Menubar,", 234 | " MenubarContent,", 235 | " MenubarItem,", 236 | " MenubarMenu,", 237 | " MenubarSeparator,", 238 | " MenubarShortcut,", 239 | " MenubarTrigger,", 240 | "} from \"@/components/ui/menubar\"", 241 | "" 242 | ], 243 | "description": "https://shadcn-vue.com/docs/components/menu-bar.html" 244 | }, 245 | 246 | "Navigation Menu": { 247 | "prefix": ["shadcn-i-navigation-menu", "cni-navigation-menu"], 248 | "body": [ 249 | "import {", 250 | " NavigationMenu,", 251 | " NavigationMenuContent,", 252 | " NavigationMenuIndicator,", 253 | " NavigationMenuItem,", 254 | " NavigationMenuLink,", 255 | " NavigationMenuList,", 256 | " NavigationMenuTrigger,", 257 | " NavigationMenuViewport,", 258 | "} from \"@/components/ui/navigation-menu\"", 259 | "" 260 | ], 261 | "description": "https://shadcn-vue.com/docs/components/navigation-menu.html" 262 | }, 263 | "Pagination": { 264 | "prefix": ["shadcn-i-pagination", "cni-pagination"], 265 | "body": [ 266 | "import {", 267 | " Pagination,", 268 | " PaginationEllipsis,", 269 | " PaginationFirst,", 270 | " PaginationLast,", 271 | " PaginationList,", 272 | " PaginationListItem,", 273 | " PaginationNext,", 274 | " PaginationPrev,", 275 | "} from '@/components/ui/pagination'", 276 | "" 277 | ], 278 | "description": "https://shadcn-vue.com/docs/components/pagination.html" 279 | }, 280 | 281 | "Pin Input": { 282 | "prefix": ["shadcn-i-pin-input", "cni-i-input"], 283 | "body": [ 284 | "import {", 285 | " PinInput,", 286 | " PinInputInput,", 287 | "} from '@/components/ui/pin-input'" 288 | "" 289 | ], 290 | "description": "https://shadcn-vue.com/docs/components/pin-input.html" 291 | }, 292 | 293 | "Popover": { 294 | "prefix": ["shadcn-i-popover", "cni-popover"], 295 | "body": [ 296 | "import {", 297 | " Popover,", 298 | " PopoverContent,", 299 | " PopoverTrigger,", 300 | "} from \"@/components/ui/popover\"", 301 | "" 302 | ], 303 | "description": "https://shadcn-vue.com/docs/components/popover.html" 304 | }, 305 | 306 | "Progress": { 307 | "prefix": ["shadcn-i-progress", "cni-progress"], 308 | "body": ["import { Progress } from \"@/components/ui/progress\"", ""], 309 | "description": "https://shadcn-vue.com/docs/components/progress.html" 310 | }, 311 | 312 | "Radio Group": { 313 | "prefix": ["shadcn-i-radio-group", "cni-radio-group"], 314 | "body": [ 315 | "import { Label } from \"@/components/ui/label\"", 316 | "import { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\"", 317 | "" 318 | ], 319 | "description": "https://shadcn-vue.com/docs/components/radio-group.html" 320 | }, 321 | 322 | "Resizable": { 323 | "prefix": ["shadcn-i-resizable", "cni-resizable"], 324 | "body": [ 325 | "import {", 326 | " ResizableHandle,", 327 | " ResizablePanel,", 328 | " ResizablePanelGroup,", 329 | "} from '@/components/ui/resizable'" 330 | ], 331 | "description": "https://shadcn-vue.com/docs/components/resizable.html" 332 | }, 333 | 334 | "Scroll Area": { 335 | "prefix": ["shadcn-i-scroll-area", "cni-scroll-area"], 336 | "body": ["import { ScrollArea } from \"@/components/ui/scroll-area\"", ""], 337 | "description": "https://shadcn-vue.com/docs/components/scroll-area.html" 338 | }, 339 | 340 | "Select": { 341 | "prefix": ["cni-select"], 342 | "body": [ 343 | "import {", 344 | " Select,", 345 | " SelectContent,", 346 | " SelectItem,", 347 | " SelectTrigger,", 348 | " SelectValue,", 349 | "} from \"@/components/ui/select\"", 350 | "" 351 | ], 352 | "description": "https://shadcn-vue.com/docs/components/select.html" 353 | }, 354 | 355 | "Separator": { 356 | "prefix": ["shadcn-i-separator", "cni-separator"], 357 | "body": ["import { Separator } from \"@/components/ui/separator\"", ""], 358 | "description": "https://shadcn-vue.com/docs/components/separator.html" 359 | }, 360 | 361 | "Sheet": { 362 | "prefix": ["shadcn-i-sheet", "cni-sheet"], 363 | "body": [ 364 | "import {", 365 | " Sheet,", 366 | " SheetContent,", 367 | " SheetDescription,", 368 | " SheetHeader,", 369 | " SheetTitle,", 370 | " SheetTrigger,", 371 | "} from \"@/components/ui/sheet\"", 372 | "" 373 | ], 374 | "description": "https://shadcn-vue.com/docs/components/sheet.html" 375 | }, 376 | 377 | "Skeleton": { 378 | "prefix": ["shadcn-i-skeleton", "cni-skeleton"], 379 | "body": ["import { Skeleton } from \"@/components/ui/skeleton\"", ""], 380 | "description": "https://shadcn-vue.com/docs/components/skeleton.html" 381 | }, 382 | 383 | "Slider": { 384 | "prefix": ["shadcn-i-slider", "cni-slider"], 385 | "body": ["import { Slider } from \"@/components/ui/slider\"", "import { cn } from \"@/lib/utils\"", ""], 386 | "description": "https://shadcn-vue.com/docs/components/slider.html" 387 | }, 388 | 389 | "Sonner": { 390 | "prefix": ["shadcn-i-sonner", "cni-sonner"], 391 | "body": [ 392 | "import { Toaster } from \"@/components/ui/sonner\"" 393 | ], 394 | "description": "https://www.shadcn-vue.com/docs/components/sonner.html" 395 | }, 396 | 397 | "Switch": { 398 | "prefix": ["shadcn-i-switch", "cni-switch"], 399 | "body": ["import { Switch } from \"@/components/ui/switch\"", ""], 400 | "description": "https://shadcn-vue.com/docs/components/switch.html" 401 | }, 402 | 403 | "Table": { 404 | "prefix": ["shadcn-i-table", "cni-table"], 405 | "body": [ 406 | "import {", 407 | " Table,", 408 | " TableBody,", 409 | " TableCaption,", 410 | " TableCell,", 411 | " TableHead,", 412 | " TableHeader,", 413 | " TableRow,", 414 | "} from \"@/components/ui/table\"", 415 | "" 416 | ], 417 | "description": "https://shadcn-vue.com/docs/components/table.html" 418 | }, 419 | 420 | "Tabs": { 421 | "prefix": ["shadcn-i-tabs", "cni-tabs"], 422 | "body": [ 423 | "import { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\"", 424 | "" 425 | ], 426 | "description": "https://shadcn-vue.com/docs/components/tabs.html" 427 | }, 428 | 429 | "Tags Input": { 430 | "prefix": ["shadcn-i-tags-input", "cni-tags-input"], 431 | "body": [ 432 | "import { TagsInput, TagsInputInput, TagsInputItem, TagsInputItemDelete, TagsInputItemText } from '@/components/ui/tags-input'" 433 | "" 434 | ], 435 | "description": "https://shadcn-vue.com/docs/components/tags-input.html" 436 | }, 437 | 438 | "Textarea": { 439 | "prefix": ["shadcn-i-textarea", "cni-textarea"], 440 | "body": ["import { Textarea } from \"@/components/ui/textarea\"", ""], 441 | "description": "https://shadcn-vue.com/docs/components/textarea.html" 442 | }, 443 | 444 | "Toast": { 445 | "prefix": ["shadcn-i-toast", "cni-toast"], 446 | "body": [ 447 | "import { Button } from '@/components/ui/button'", 448 | "import { useToast } from '@/components/ui/toast/use-toast'" 449 | ], 450 | "description": "https://shadcn-vue.com/docs/components/toast.html" 451 | }, 452 | 453 | "Toggle": { 454 | "prefix": ["shadcn-i-toggle", "cni-toggle"], 455 | "body": ["import { Toggle } from \"@/components/ui/toggle\"", ""], 456 | "description": "https://shadcn-vue.com/docs/components/toggle.html" 457 | }, 458 | 459 | "Tooltip": { 460 | "prefix": ["shadcn-i-tooltip", "cni-tooltip"], 461 | "body": [ 462 | "import {", 463 | " Tooltip,", 464 | " TooltipContent,", 465 | " TooltipProvider,", 466 | " TooltipTrigger,", 467 | "} from \"@/components/ui/tooltip\"", 468 | "" 469 | ], 470 | "description": "https://shadcn-vue.com/docs/components/tooltip.html" 471 | } 472 | } 473 | -------------------------------------------------------------------------------- /src/snippets/usage.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "Accordion": { 3 | "prefix": ["shadcn-x-accordion", "cnx-accordion"], 4 | "body": [ 5 | " ", 6 | " ", 7 | " Is it accessible?", 8 | " ", 9 | " Yes. It adheres to the WAI-ARIA design pattern.", 10 | " ", 11 | " ", 12 | " ", 13 | ], 14 | "description": "https://shadcn-vue.com/docs/components/accordion.html" 15 | }, 16 | 17 | "Alert": { 18 | "prefix": ["shadcn-x-alert", "cnx-alert"], 19 | "body": [ 20 | " ", 21 | " Heads up!", 22 | " ", 23 | " You can add components to your app using the cli.", 24 | " ", 25 | " ", 26 | ], 27 | "description": "https://shadcn-vue.com/docs/components/alert.html" 28 | }, 29 | 30 | "Alert Destructive": { 31 | "prefix": ["shadcn-x-alert-destructive", "cnx-alert-destructive"], 32 | "body": [ 33 | " ", 34 | " Error", 35 | " ", 36 | " Your session has expired. Please log in again.", 37 | " ", 38 | " ", 39 | ], 40 | "description": "https://shadcn-vue.com/docs/components/alert.html" 41 | }, 42 | 43 | "Alert Dialog": { 44 | "prefix": ["shadcn-x-alert-dialog", "cnx-alert-dialog"], 45 | "body": [ 46 | " ", 47 | " Open", 48 | " ", 49 | " ", 50 | " Are you absolutely sure?", 51 | " ", 52 | " This action cannot be undone. This will permanently delete your account", 53 | " and remove your data from our servers.", 54 | " ", 55 | " ", 56 | " ", 57 | " Cancel", 58 | " Continue", 59 | " ", 60 | " ", 61 | " ", 62 | ], 63 | "description": "https://shadcn-vue.com/docs/components/alert-dialog.html" 64 | }, 65 | 66 | "Aspect Ratio": { 67 | "prefix": ["shadcn-x-aspect-ratio", "cnx-aspect-ratio"], 68 | "body": [ 69 | "
", 70 | " ", 71 | " \"Image\"", 72 | " ", 73 | "
", 74 | ], 75 | "description": "https://shadcn-vue.com/docs/components/aspect-ratio.html" 76 | }, 77 | 78 | "Avatar": { 79 | "prefix": ["shadcn-x-avatar", "cnx-avatar"], 80 | "body": [ 81 | "", 82 | " ", 83 | " CN", 84 | "", 85 | ], 86 | "description": "https://shadcn-vue.com/docs/components/avatar.html" 87 | }, 88 | 89 | "Badge": { 90 | "prefix": ["shadcn-x-badge", "cnx-badge"], 91 | "body": [ 92 | "Badge", 93 | ], 94 | "description": "https://shadcn-vue.com/docs/components/badge.html" 95 | }, 96 | 97 | "Badge Destructive": { 98 | "prefix": ["shadcn-x-badge-destructive", "cnx-badge-destructive"], 99 | "body": [ 100 | "", 101 | " Destructive", 102 | "", 103 | ], 104 | "description": "https://shadcn-vue.com/docs/components/badge.html" 105 | }, 106 | 107 | "Badge Outline": { 108 | "prefix": ["shadcn-x-badge-outline", "cnx-badge-outline"], 109 | "body": [ 110 | "", 111 | " Outline", 112 | "", 113 | ], 114 | "description": "https://shadcn-vue.com/docs/components/badge.html" 115 | }, 116 | 117 | "Badge Secondary": { 118 | "prefix": ["shadcn-x-badge-secondary", "cnx-badge-secondary"], 119 | "body": [ 120 | "", 121 | " Secondary", 122 | "", 123 | ], 124 | "description": "https://shadcn-vue.com/docs/components/badge.html" 125 | }, 126 | 127 | "Button": { 128 | "prefix": ["shadcn-x-button", "cnx-button"], 129 | "body": [ 130 | "", 131 | ], 132 | "description": "https://shadcn-vue.com/docs/components/button.html" 133 | }, 134 | 135 | "Calendar": { 136 | "prefix": ["shadcn-x-calendar", "cnx-calendar"], 137 | "body": [ 138 | "", 139 | ], 140 | "description": "https://shadcn-vue.com/docs/components/calendar.html" 141 | }, 142 | 143 | 144 | "Card": { 145 | "prefix": ["shadcn-x-card", "cnx-card"], 146 | "body": [ 147 | " ", 148 | " ", 149 | " Card Title", 150 | " Card Description", 151 | " ", 152 | " ", 153 | " Card Content", 154 | " ", 155 | " ", 156 | " Card Footer", 157 | " ", 158 | " ", 159 | ], 160 | "description": "https://shadcn-vue.com/docs/components/card.html" 161 | }, 162 | 163 | "Carousel": { 164 | "prefix": ["shadcn-x-carousel", "cnx-carousel"], 165 | "body": [ 166 | " ", 167 | " ", 168 | " ", 169 | "
", 170 | " ", 171 | " ", 172 | " {{ index + 1 }}", 173 | " ", 174 | " ", 175 | "
", 176 | "
", 177 | "
", 178 | " ", 179 | " ", 180 | "
" 181 | ], 182 | "description": "https://shadcn-vue.com/docs/components/carousel.html" 183 | }, 184 | 185 | "Carousel-Vertical": { 186 | "prefix": ["shadcn-x-carousel-vertical", "cnx-carousel-vertical"], 187 | "body": [ 188 | " ", 195 | " ", 196 | " ", 197 | "
", 198 | " ", 199 | " ", 200 | " {{ index + 1 }}", 201 | " ", 202 | " ", 203 | "
", 204 | "
", 205 | "
", 206 | " ", 207 | " ", 208 | " " 209 | ], 210 | "description": "https://shadcn-vue.com/docs/components/carousel.html" 211 | }, 212 | 213 | "Checkbox": { 214 | "prefix": ["shadcn-x-checkbox", "cnx-checkbox"], 215 | "body": [ 216 | "", 217 | ], 218 | "description": "https://shadcn-vue.com/docs/components/checkbox.html" 219 | }, 220 | 221 | "Collapsible": { 222 | "prefix": ["shadcn-x-collapsible", "cnx-collapsible"], 223 | "body": [ 224 | "", 225 | " Can I use this in my project?", 226 | " ", 227 | " Yes. Free to use for personal and commercial projects. No attribution", 228 | " required.", 229 | " ", 230 | "", 231 | "" 232 | ], 233 | "description": "https://shadcn-vue.com/docs/components/collapsible.html" 234 | }, 235 | 236 | "Command": { 237 | "prefix": ["shadcn-x-command", "cnx-command"], 238 | "body": [ 239 | "", 240 | " ", 241 | " ", 242 | " No results found.", 243 | " ", 244 | " Calendar", 245 | " Search Emoji", 246 | " Calculator", 247 | " ", 248 | " ", 249 | " ", 250 | " Profile", 251 | " Billing", 252 | " Settings", 253 | " ", 254 | " ", 255 | "", 256 | "" 257 | ], 258 | "description": "https://shadcn-vue.com/docs/components/command.html" 259 | }, 260 | 261 | "Context Menu": { 262 | "prefix": ["shadcn-x-context-menu", "cnx-context-menu"], 263 | "body": [ 264 | "", 265 | " Right click", 266 | " ", 267 | " Profile", 268 | " Billing", 269 | " Team", 270 | " Subscription", 271 | " ", 272 | "", 273 | "" 274 | ], 275 | "description": "https://shadcn-vue.com/docs/components/context-menu.html" 276 | }, 277 | 278 | "Dialog": { 279 | "prefix": ["shadcn-x-dialog", "cnx-dialog"], 280 | "body": [ 281 | "", 282 | " Open", 283 | " ", 284 | " ", 285 | " Are you sure absolutely sure?", 286 | " ", 287 | " This action cannot be undone. This will permanently delete your account", 288 | " and remove your data from our servers.", 289 | " ", 290 | " ", 291 | " ", 292 | "", 293 | "" 294 | ], 295 | "description": "https://shadcn-vue.com/docs/components/dialog.html" 296 | }, 297 | 298 | "Drawer": { 299 | "prefix": ["shadcn-x-drawer", "cnx-drawer"], 300 | "body": [ 301 | " ", 302 | " Open", 303 | " ", 304 | " ", 305 | " Are you absolutely sure?", 306 | " This action cannot be undone.", 307 | " ", 308 | " ", 309 | " ", 310 | " ", 311 | " ", 314 | " ", 315 | " ", 316 | " ", 317 | " " 318 | ], 319 | "description": "https://shadcn-vue.com/docs/components/drawer.html" 320 | }, 321 | 322 | "Dropdown Menu": { 323 | "prefix": ["shadcn-x-dropdown-menu", "cnx-dropdown-menu"], 324 | "body": [ 325 | "", 326 | " Open", 327 | " ", 328 | " My Account", 329 | " ", 330 | " Profile", 331 | " Billing", 332 | " Team", 333 | " Subscription", 334 | " ", 335 | "", 336 | "" 337 | ], 338 | "description": "https://shadcn-vue.com/docs/components/dropdown-menu.html" 339 | }, 340 | 341 | "Hover Card": { 342 | "prefix": ["shadcn-x-hover-card", "cnx-hover-card"], 343 | "body": [ 344 | "", 345 | " Hover", 346 | " ", 347 | " The React Framework – created and maintained by @vercel.", 348 | " ", 349 | "", 350 | "" 351 | ], 352 | "description": "https://shadcn-vue.com/docs/components/hover-card.html" 353 | }, 354 | 355 | "Input": { 356 | "prefix": ["shadcn-x-input", "cnx-input"], 357 | "body": ["", ""], 358 | "description": "https://shadcn-vue.com/docs/components/input.html" 359 | }, 360 | 361 | "Label": { 362 | "prefix": ["shadcn-x-label", "cnx-label"], 363 | "body": ["", ""], 364 | "description": "https://shadcn-vue.com/docs/components/label.html" 365 | }, 366 | 367 | "Menubar": { 368 | "prefix": ["shadcn-x-menubar", "cnx-menubar"], 369 | "body": [ 370 | "", 371 | " ", 372 | " File", 373 | " ", 374 | " ", 375 | " New Tab ⌘T", 376 | " ", 377 | " New Window", 378 | " ", 379 | " Share", 380 | " ", 381 | " Print", 382 | " ", 383 | " ", 384 | "", 385 | "" 386 | ], 387 | "description": "https://shadcn-vue.com/docs/components/menubar.html" 388 | }, 389 | 390 | "Navigation Menu": { 391 | "prefix": ["shadcn-x-navigation-menu", "cnx-navigation-menu"], 392 | "body": [ 393 | "", 394 | " ", 395 | " ", 396 | " Item One", 397 | " ", 398 | " Link", 399 | " ", 400 | " ", 401 | " ", 402 | "", 403 | "" 404 | ], 405 | "description": "https://shadcn-vue.com/docs/components/navigation-menu.html" 406 | }, 407 | 408 | "Pagination": { 409 | "prefix": ["shadcn-x-pagination", "cnx-pagination"], 410 | "body": [ 411 | " ", 412 | " ", 413 | " ", 414 | " ", 415 | "", 416 | " ", 424 | "", 425 | " ", 426 | " ", 427 | " ", 428 | " " 429 | ], 430 | "description": "https://shadcn-vue.com/docs/components/pagination.html" 431 | }, 432 | 433 | "Pin Input": { 434 | "prefix": ["shadcn-x-pin-input", "cnx-pin-input"], 435 | "body": [ 436 | " ", 443 | " ", 448 | " " 449 | ], 450 | "description": "https://shadcn-vue.com/docs/components/pin-input.html" 451 | }, 452 | 453 | "Popover": { 454 | "prefix": ["shadcn-x-popover", "cnx-popover"], 455 | "body": [ 456 | "", 457 | " Open", 458 | " Place content for the popover here.", 459 | "", 460 | "" 461 | ], 462 | "description": "https://shadcn-vue.com/docs/components/popover.html" 463 | }, 464 | 465 | "Progress": { 466 | "prefix": ["shadcn-x-progress", "cnx-progress"], 467 | "body": ["", ""], 468 | "description": "https://shadcn-vue.com/docs/components/progress.html" 469 | }, 470 | 471 | "Radio Group": { 472 | "prefix": ["shadcn-x-radio-group", "cnx-radio-group"], 473 | "body": [ 474 | " ", 475 | "
", 476 | " ", 477 | " ", 478 | "
", 479 | "
", 480 | " ", 481 | " ", 482 | "
", 483 | "
", 484 | " ", 485 | " ", 486 | "
", 487 | "
" 488 | ], 489 | "description": "https://shadcn-vue.com/docs/components/radio-group.html" 490 | }, 491 | 492 | 493 | "Resizable": { 494 | "prefix": ["shadcn-x-resizable", "cnx-resizable"], 495 | "body": [ 496 | " ", 497 | " One", 498 | " ", 499 | " Two", 500 | " " 501 | ], 502 | "description": "https://shadcn-vue.com/docs/components/resizable.html" 503 | }, 504 | 505 | "Scroll Area": { 506 | "prefix": ["shadcn-x-scroll-area", "cnx-scroll-area"], 507 | "body": [ 508 | "", 509 | " Jokester began sneaking into the castle in the middle of the night and leaving", 510 | " jokes all over the place: under the king's pillow, in his soup, even in the", 511 | " royal toilet. The king was furious, but he couldn't seem to stop Jokester. And", 512 | " then, one day, the people of the kingdom discovered that the jokes left by", 513 | " Jokester were so funny that they couldn't help but laugh. And once they", 514 | " started laughing, they couldn't stop.", 515 | "", 516 | "" 517 | ], 518 | "description": "https://shadcn-vue.com/docs/components/scroll-area.html" 519 | }, 520 | 521 | "Select": { 522 | "prefix": ["cnx-select", "shadcn-x-select"], 523 | "body": [ 524 | " " 537 | ], 538 | "description": "https://shadcn-vue.com/docs/components/select.html" 539 | }, 540 | 541 | "Separator": { 542 | "prefix": ["shadcn-x-separator", "cnx-separator"], 543 | "body": ["", ""], 544 | "description": "https://shadcn-vue.com/docs/components/separator.html" 545 | }, 546 | 547 | "Sheet": { 548 | "prefix": ["shadcn-x-sheet", "cnx-sheet"], 549 | "body": [ 550 | " ", 551 | " Open", 552 | " ", 553 | " ", 554 | " Are you sure absolutely sure?", 555 | " ", 556 | " This action cannot be undone. This will permanently delete your account", 557 | " and remove your data from our servers.", 558 | " ", 559 | " ", 560 | " ", 561 | " " 562 | ], 563 | "description": "https://shadcn-vue.com/docs/components/sheet.html" 564 | }, 565 | 566 | "Skeleton": { 567 | "prefix": ["shadcn-x-skeleton", "cnx-skeleton"], 568 | "body": [ 569 | "
", 570 | " ", 571 | "
", 572 | " ", 573 | " ", 574 | "
", 575 | "
" 576 | ], 577 | "description": "https://shadcn-vue.com/docs/components/skeleton.html" 578 | }, 579 | 580 | "Slider": { 581 | "prefix": ["shadcn-x-slider", "cnx-slider"], 582 | "body": [ 583 | " " 589 | ], 590 | "description": "https://shadcn-vue.com/docs/components/slider.html" 591 | }, 592 | 593 | "Sonner": { 594 | "prefix": ["shadcn-x-sonner", "cnx-sonner"], 595 | "body": [ 596 | "" 597 | ], 598 | "description": "https://shadcn-vue.com/docs/components/sonner.html" 599 | }, 600 | 601 | "Switch": { 602 | "prefix": ["shadcn-x-switch", "cnx-switch"], 603 | "body": ["", ""], 604 | "description": "https://shadcn-vue.com/docs/components/switch.html" 605 | }, 606 | 607 | "Table": { 608 | "prefix": ["shadcn-x-table", "cnx-table"], 609 | "body": [ 610 | " ", 611 | " A list of your recent invoices.", 612 | " ", 613 | " ", 614 | " ", 615 | " Invoice", 616 | " ", 617 | " Status", 618 | " Method", 619 | " ", 620 | " Amount", 621 | " ", 622 | " ", 623 | " ", 624 | " ", 625 | " ", 626 | " ", 627 | " INV001", 628 | " ", 629 | " Paid", 630 | " Credit Card", 631 | " ", 632 | " $250.00", 633 | " ", 634 | " ", 635 | " ", 636 | "
" 637 | ], 638 | "description": "https://shadcn-vue.com/docs/components/table.html" 639 | }, 640 | 641 | "Tabs": { 642 | "prefix": ["shadcn-x-tabs", "cnx-tabs"], 643 | "body": [ 644 | " ", 645 | " ", 646 | " ", 647 | " Account", 648 | " ", 649 | " ", 650 | " Password", 651 | " ", 652 | " ", 653 | " ", 654 | " Make changes to your account here.", 655 | " ", 656 | " ", 657 | " Change your password here.", 658 | " ", 659 | " " 660 | ], 661 | "description": "https://shadcn-vue.com/docs/components/tabs.html" 662 | }, 663 | 664 | "Tags Input": { 665 | "prefix": ["shadcn-x-tags-input", "cnx-tags-input"], 666 | "body": [ 667 | " ", 668 | " ", 669 | " ", 670 | " ", 671 | " ", 672 | "", 673 | " ", 674 | " " 675 | "" 676 | ], 677 | "description": "https://shadcn-vue.com/docs/components/tags-input.html" 678 | }, 679 | 680 | "Textarea": { 681 | "prefix": ["shadcn-x-textarea", "cnx-textarea"], 682 | "body": ["