Angular Tailwind Integration
2025-01-08
Install tailwindcss
and postcss
as dev deps:
pnpm add -D tailwindcss postcss autoprefixer
Configure Tailwind to scan for implemented class names:
// tailwind.config.js
module.exports = {
content: [
'./src/**/*.{html,ts}',
'./src/app/**/*.{html,ts}',
'./src/components/**/*.{html,ts}',
],
theme: {
extend: {},
},
plugins: [],
}
Add Tailwind Directives to styles:
@tailwind base;
@tailwind components;
@tailwind utilities;