daisyUI

daisyUI

Tailwind CSS component classes

Features

  • Semantic class names on top of Tailwind CSS
  • 30+ themes with theme switcher support
  • No JavaScript — pure CSS components
  • Framework-agnostic (works with any HTML)
  • Customizable through Tailwind config

Pros

  • Reduces Tailwind verbosity with semantic classes
  • Extensive theming system with 30+ built-in themes
  • No JavaScript dependency — pure CSS
  • Works with any framework or plain HTML

Cons

  • Less control than headless component libraries
  • Interactive components need your own JavaScript
  • Opinionated styling may conflict with custom designs

Overview

daisyUI is a Tailwind CSS component library that adds semantic class names like btn, card, modal, and badge on top of Tailwind’s utility classes. Instead of writing bg-blue-500 text-white px-4 py-2 rounded, you write btn btn-primary — making your HTML more readable while still being fully customizable with Tailwind utilities.

daisyUI is pure CSS with no JavaScript runtime. Components are styled using CSS class names, and you add interactivity with whatever JavaScript framework you prefer. Its theming system supports 30+ built-in themes and makes it easy to create custom themes with CSS custom properties.

When to Use

daisyUI is the right choice when you want Tailwind CSS with less verbose markup, when you need a theming system with multiple built-in themes, or when building prototypes and projects where you want pre-styled components without the overhead of a JavaScript component library.

Getting Started

npm install daisyui
<!-- Add to your CSS -->
<!-- @plugin "daisyui" in tailwind v4 -->

<div class="card w-96 bg-base-100 shadow-xl">
  <div class="card-body">
    <h2 class="card-title">Hello, daisyUI!</h2>
    <p>Pure CSS components for Tailwind CSS</p>
    <div class="card-actions justify-end">
      <button class="btn btn-primary">Get Started</button>
    </div>
  </div>
</div>