File: angular.md | Updated: 11/15/2025
⌘KCtrl KDocs Blog Showcase Sponsor Plus
Installation
Setting up Tailwind CSS in an Angular project.
01
Start by creating a new Angular project if you don’t have one set up already. The most common approach is to use Angular CLI .
Terminal
ng new my-project --style csscd my-project
02
Install @tailwindcss/postcss and its peer dependencies via npm.
Terminal
npm install tailwindcss @tailwindcss/postcss postcss --force
03
Create a .postcssrc.json file in the root of your project and add the @tailwindcss/postcss plugin to your PostCSS configuration.
.postcssrc.json
{ "plugins": { "@tailwindcss/postcss": {} }}
04
Add an @import to ./src/styles.css that imports Tailwind CSS.
styles.css
@import "tailwindcss";
05
Run your build process with ng serve.
Terminal
ng serve
06
Start using Tailwind’s utility classes to style your content.
app.component.html
<h1 class="text-3xl font-bold underline"> Hello world!</h1>
Copyright © 2025 Tailwind Labs Inc.·Trademark Policy