-
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.js
andpostcss.config.js
files.) -
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 [email protected]
(If installing [email protected] does not the packages like class-variance-authority, clsx, reka-ui, tailwind-merge, tailwindcss-animate then you need to manually install them)
-
Initialized Shadcn-Vue:
npx [email protected] init
(This command creates a
components.json
file.) -
Added a UI component (e.g., Button) using Shadcn-Vue:
npx [email protected] 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