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.

  • : 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.

*I'm enjoying daisyUI*

Alexander Thomsen
Founder of moonbit.ai

DaisyUI just looks amazing.

Kelvin Htat
Solo founder

daisyUI 5 + Tailwind CSS 4 is just an amazing combo for fast and high-end results

Nacho Herrera
Developer

Can't state how much I love daisyUI ♥️

rootkid
Software Developer

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

Josh Cirre
Entrepreneur

daisyUI is probably the *best Tailwind Plugin I've ever used*, I've been using it since 2023

Shaun Furtado
JS dev

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