Skip to content
Blogs
Go back

Angular with TailwindCSS

First need to Install Tailwind CSS using CLI command :

npm install -D tailwindcss postcss autoprefixer

Next Run init command to generate tailwind.config.js

npx tailwindcss init

Configuring template paths :

In tailwind.config.js

/** @type {import('tailwindcss').Config} */
module.exports = {

...

  content: [
    "./src/**/*.{html,ts}",
  ],

...

}

Adding the Tailwind directives to your CSS :

In style.css

@tailwind base;
@tailwind components;
@tailwind utilities;

Share this post:

Previous Post
AstroPaper 2.0
Next Post
Angular with angular material