npm install -D tailwindcss
npx tailwindcss init
// It will create Tailwind CSS config file: tailwind.config.js
//change content acc to destination
"scripts": {
"build": "tailwindcss -i ./input.css -o ./css/styles.css" ,
"watch": "tailwindcss -i ./input.css -o ./css/styles.css --watch"
}
Add the @tailwind directives for each of Tailwind’s layers to your main CSS file.
@tailwind base;
@tailwind components;
@tailwind utilities;
npm run build
npm run watch
<link rel="stylesheet" href="css/styles.css" />