Install daisyUI for Angular

How to install Tailwind CSS and daisyUI in a Angular project

1. Create a new Angular project

Install Angular CLI globally

Terminal
npm install -g @angular/cli@latest

Create a new Angular project called my-project and navigate to it

Terminal
ng new my-project --style css
cd my-project

2. Install Tailwind CSS, PostCSS, and daisyUI

Terminal
npm install daisyui@beta tailwindcss@latest @tailwindcss/postcss@latest postcss@latest --force

Add Tailwind CSS plugin for PostCSS to a new .postcssrc.json file at root

.postcssrc.json
{
  "plugins": {
    "@tailwindcss/postcss": {}
  }
}

Put Tailwind CSS and daisyUI in your CSS file (and remove old styles)

src/styles.css
@import "tailwindcss";
@plugin "daisyui";

Run the Angular development server

Terminal
ng serve

Now you can use daisyUI class names!

Do you have a question? Ask on GitHub or Discord server
Do you like daisyUI? Post about it!
Support daisyUI's development: Open Collective
daisyUI store

Official daisyUI
Figma Library

Available on daisyUI store

More details