DEV Community

Cover image for How to install tailwind Css (Fast and Easy)
Igah Franklin C
Igah Franklin C

Posted on • Edited on

How to install tailwind Css (Fast and Easy)

here is the link to the video Watch Video here ...it's straight to point.
please, do not forget to subscribe
Help my Channel grow 😊 🙏

step 1
make sure you download and install nodejs if you haven't
use this link download NodeJs

step2
create a new folder called tailwindproj (you can call it anything you like)

step 3
open the project folder in your code editor (I am using Vs Code)
and open a new terminal

step 4
copy and run the following command into your terminal

npm init -y

Enter fullscreen mode Exit fullscreen mode

step 5


npm install -D tailwindcss

Enter fullscreen mode Exit fullscreen mode

step 6


npx tailwindcss init

Enter fullscreen mode Exit fullscreen mode

step 7
copy and replace the command in "tailwind.config.js" file with the command below


module.exports = {
  content: ["./public/**/*.{html,js}"],
  theme: {
    extend: {},
  },
  plugins: [],
}


Enter fullscreen mode Exit fullscreen mode

step 8
-create a new folder called "src" inside your project folder
-create a file called "styles.css" inside the src folder

step 9
copy and paste the code below inside the styles.css file created

@tailwind base;
@tailwind components;
@tailwind utilities;
Enter fullscreen mode Exit fullscreen mode

*step 10 *
paste and run the code below in your terminal

npx tailwindcss -i ./src/styles.css -o ./public/styles.css --watch
Enter fullscreen mode Exit fullscreen mode

step 11
A new folder called "public" is automatically generated after running the command above
-create a new html file "index.html" for your project inside the folder "public"

step 11
link the generated css file (styles.css) to your project.

your project should basically look like this now
from unsplash

step 12
reload your project and that's it.

here is the link to the video Watch Video here ...it's straight to point.
please, do not forget to subscribe
Help my Channel grow 😊 🙏
thaaaank you sooo much 😊

Top comments (0)