Install TailwindCSS in Angular

Today we will see how to install TailwindCSS in an Angular project
Create or use your Angular project
ng new project
cd project
**Install and configure TailwindCSS **
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init # Will generate a file tailwind.config.js
Configure the paths of all your template files
Edit your tailwind.config.js to add these lines :
module.exports = {
content: [
"./src/**/*.{html,ts}",
],
theme: {
extend: {},
},
plugins: [],
}
Add TailwindCSS directives to your CSS file style.css
@tailwind base;
@tailwind components;
@tailwind utilities;
**Enjoy using TailwindCSS ** ng serve




![TypeScript's [number] Index Signature: Extract Union Types from Arrays](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1752960594694%2Fe2be9492-869f-4169-bb1a-950ee81a3887.png&w=3840&q=75)