-
Created the project with Vite:
npm create vite@latest shadcn-vue -- --template vue-js
-
Navigated into the project directory:
cd shadcn-vue -
Installed project dependencies:
npm install
-
Ran the development server:
npm run dev
-
Installed TailwindCSS, PostCSS, and Autoprefixer:
npm install -D tailwindcss@3 postcss autoprefixer
-
Initialized TailwindCSS configuration:
npx tailwindcss init -p
(This command creates both
tailwind.config.jsandpostcss.config.jsfiles.) -
Added
jsconfig.json
(This file is used to properly resolve path aliases in your project.) -
Installed Shadcn-Vue CLI (compatible with TailwindCSS v3):
npm install -D shadcn-vue@1.0.3
(If installing shadcn-vue@1.0.3 does not the packages like class-variance-authority, clsx, reka-ui, tailwind-merge, tailwindcss-animate then you need to manually install them)
npm i class-variance-authority@0.7.1 clsx@2.1.1 reka-ui@2.2.0 tailwind-merge@3.2.0 tailwindcss-animate@1.0.7
-
Initialized Shadcn-Vue:
npx shadcn-vue@1.0.3 init
(This command creates a
components.jsonfile.) -
Added a UI component (e.g., Button) using Shadcn-Vue:
npx shadcn-vue@1.0.3 add button
-
Clone the repository:
git clone {repository-url} -
Navigate into the project folder:
cd {project-name} -
Install dependencies and start the dev server:
npm install npm run dev
-
Access the application:
Open your browser and visit: http://localhost:5173