daisyUI v5.6 is now available!

Astro component library

Use daisyUI as a Tailwind CSS component library for Astro projects

Best Astro component library

Astro

Astro is a web framework for content-driven sites such as marketing pages, docs, blogs, portfolios, and ecommerce content.

Its core idea is to ship less JavaScript. Astro renders pages to HTML by default and lets you add interactive islands only where the page needs browser-side behavior.

Astro also lets you bring React, Vue, Svelte, Solid, and other component frameworks into the same project. That makes it useful when a mostly static site still needs a few interactive pieces.

Astro + daisyUI

daisyUI matches Astro's HTML-first approach. Most daisyUI components are plain markup plus CSS classes, so they work in .astro files and inside framework islands.

The fit is straightforward:

  • CSS-only components: daisyUI doesn't add hydration work to pages that Astro can serve as static HTML.

  • Consistent styling across islands: The same btn, card, badge, and menu classes work in Astro markup and in React, Vue, Svelte, or Solid components.

  • Good docs and marketing primitives: Alerts, cards, tabs, accordions, mockups, and typography-friendly components cover many content-site patterns.

  • Theme control in HTML: Themes use DOM attributes and CSS variables, which fits Astro layouts well.

Astro keeps pages lean. daisyUI gives those pages a finished interface without turning every section into a JavaScript component.

daisyUI really makes it super easy to get a clean looking MVP up and out the door.

Josh Cirre
Entrepreneur

DaisyUI just looks amazing.

Kelvin Htat
Solo founder

If you want to create a quick MVP for your next project, I recommend daisyUI. It offers a simple and elegant design.✨

Jairon Landa
Software developer

Been using daisyUI for a while and I must say...such a fun addon for Tailwind CSS, well done 🔥

Dev Ed
Content Creator

daisyUI is amazing and *I use it for all my projects*

Cyris
Software Engineer

Can't state how much I love daisyUI ♥️

rootkid
Software Developer

Install Tailwind CSS and daisyUI for Astro

Setting up daisyUI in Astro uses the Tailwind CSS Vite plugin.

Create an Astro project, install Tailwind CSS, @tailwindcss/vite, and daisyUI, then add @plugin "daisyui" in your CSS file.

After setup, daisyUI classes work in .astro templates and in any framework components you use.

For Astro-specific installation instructions, see How to install daisyUI with Astro.

daisyUI is the most popular
component library for Tailwind CSS

Used by engineers at

Meta Research
Alibaba
Amazon
Adobe
Pepsico
Google Cloud