step13

Vite React + Tailwind CSS 4.0 Setup Guides / Tutorial

Vite React + Tailwind CSS 4.0 Setup

npm install vite@6.2.5 –save-dev

Step 1: C:\project-folder>npm create vite@latest or

Step 2: Enter Project Name: CRM-Dashboard-01

steps

Step 3: Select React framework

steps2

Step 4: Select Javascript

steps3

Step 5: C:\project-folder>cd CRM-Dashboard-01

steps5

Step 6: Open Project in VS Code -> ‘code .’

C:\project-folder>CRM-Dashboard-01> code .

The project has been successfully opened in Visual Studio Code, as shown in the screenshot below.

step7

Step 7. Next, open the terminal in VS Code using the menu: Terminal > New Terminal.

step8

Step 8: Install Project Dependencies
C:\project-folder>CRM-Dashboard-01>npm install

step9

Step 9: Start the Development Server
C:\project-folder>CRM-Dashboard-01>npm run dev

step10 (1)

Step 10: “Open your browser (e.g., Chrome) and visit the following URL to view the project:
http://localhost:5174

step11

Step 11: Install Tailwind CSS
C:\project-folder>CRM-Dashboard-01>npm install tailwindcss @tailwindcss/vite

step12

Step 12: Open the vite.config.js file in your project

step13

Step 13: Open the index.css file
Add @import “tailwindcss”;

step14

Step 14: 💡 How to Confirm Tailwind Is Working -> Open App.jsx add Tailwind Css Style
ClassName=“text-blue-600” Sets the text color to a medium blue shade.
ClassName=“grid-cols-3” Defines 3 equal-width columns.

step17

Step 15: Start the Development Server “npm run dev” & test tailwind css style

step18

Tailwind CSS styles are working fine, as shown in the screenshot below.

step16 (1)

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *