Skip to content
daisyui logo

daisyUI Component Library

daisyui

Guide for daisyUI component library with Tailwind CSS. Use when building UI components, implementing themes, or creating responsive designs with daisyUI.

SKILL.md

Full skill instructions

daisyUI Component Library

Use this skill when building user interfaces with daisyUI and Tailwind CSS, implementing UI components, or configuring themes.

When to Use This Skill

Activate when:

  • Building UI components with daisyUI
  • Choosing appropriate daisyUI components for design needs
  • Implementing responsive layouts with daisyUI
  • Configuring or customizing themes
  • Converting designs to daisyUI components
  • Troubleshooting daisyUI component styling

What is daisyUI?

daisyUI is a Tailwind CSS component library providing:

  • Semantic component classes - High-level abstractions of Tailwind utilities
  • 33+ built-in themes - Light, dark, and creative theme variants
  • Framework-agnostic - Works with any HTML/​CSS project
  • Utility-first compatible - Combine components with Tailwind utilities

Installation

Add daisyUI to your project:

npm install -D daisyui@latest

Configure tailwind.config.js:

module.exports = {
  plugins: [require("daisyui")],
}

For detailed installation options and CDN usage, see references/​installation.md.

Component Categories

daisyUI provides components across these categories:

  • Actions: Buttons, dropdowns, modals, swap
  • Data Display: Cards, badges, tables, carousels, stats
  • Data Input: Input, textarea, select, checkbox, radio, toggle
  • Navigation: Navbar, menu, tabs, breadcrumbs, pagination
  • Feedback: Alert, progress, loading, toast, tooltip
  • Layout: Drawer, footer, hero, stack, divider

For component-specific guidance, consult the appropriate reference file.

Quick Usage

Basic Button

<button class="btn">Button</​button>
<button class="btn btn-primary">Primary</​button>
<button class="btn btn-secondary">Secondary</​button>
<button class="btn btn-accent">Accent</​button>

Card Component

<div class="card w-96 bg-base-100 shadow-xl">
  <figure><img src="image.jpg" alt="Image" /></​figure>
  <div class="card-body">
    <h2 class="card-title">Card Title</​h2>
    <p>Card description text</​p>
    <div class="card-actions justify-end">
      <button class="btn btn-primary">Action</​button>
    </​div>
  </​div>
</​div>

Modal

<button class="btn" onclick="my_modal.showModal()">Open Modal</​button>

<dialog id="my_modal" class="modal">
  <div class="modal-box">
    <h3 class="font-bold text-lg">Modal Title</​h3>
    <p class="py-4">Modal content here</​p>
    <div class="modal-action">
      <form method="dialog">
        <button class="btn">Close</​button>
      </​form>
    </​div>
  </​div>
</​dialog>

Theming

Using Built-in Themes

Set theme via HTML attribute:

<html data-theme="cupcake">

Available themes: light, dark, cupcake, bumblebee, emerald, corporate, synthwave, retro, cyberpunk, valentine, halloween, garden, forest, aqua, lofi, pastel, fantasy, wireframe, black, luxury, dracula, cmyk, autumn, business, acid, lemonade, night, coffee, winter, dim, nord, sunset

Theme Switching

<select class="select" data-choose-theme>
  <option value="light">Light</​option>
  <option value="dark">Dark</​option>
  <option value="cupcake">Cupcake</​option>
</​select>

For advanced theming and customization, see references/​theming.md.

Responsive Design

daisyUI components work with Tailwind's responsive prefixes:

<button class="btn btn-sm md:btn-md lg:btn-lg">
  Responsive Button
</​button>

<div class="card w-full md:w-96">
  <!-- Responsive card -->
</​div>

When to Consult References

  • Installation details: Read references/​installation.md
  • Complete component list: Read references/​components.md
  • Theming and customization: Read references/​theming.md
  • Layout patterns: Read references/​layouts.md
  • Form components: Read references/​forms.md
  • Common patterns: Read references/​patterns.md

Combining with Tailwind Utilities

daisyUI semantic classes combine with Tailwind utilities:

<!-- daisyUI component + Tailwind utilities -->
<button class="btn btn-primary shadow-lg hover:shadow-xl transition-all">
  Enhanced Button
</​button>

<div class="card bg-base-100 border-2 border-primary rounded-lg p-4">
  <!-- Card with custom styling -->
</​div>

Key Principles

  • Semantic over utility: Use component classes for common patterns
  • Utility for customization: Apply Tailwind utilities for unique styling
  • Theme-aware: Components adapt to theme colors automatically
  • Accessible: Components follow accessibility best practices
  • Composable: Combine components to build complex UIs

Pro Tips

  • Use btn-{size} modifiers: btn-xs, btn-sm, btn-md, btn-lg
  • Add btn-outline for outlined button variants
  • Use badge component for status indicators
  • Combine modal with modal-backdrop for better UX
  • Use drawer for mobile navigation patterns
  • Leverage stats component for dashboard metrics
  • Use loading class on buttons for async operations

More Design skills

brandkit logo
Design

brandkit

Premium brand-kit image generation for high-end identity systems, logo concepts, and visual-world presentations.

92.7K 345.8K
View

Premium website design-to-code skill that generates visual references first, then builds faithful frontend implementations.

92.7K 341.7K
View

Premium frontend image direction for landing pages and marketing sites, generating one distinct horizontal image per section.

92.7K 337.8K
View

Premium mobile app screen concepts and flows with clean hierarchy, strong imagery, and distinctive art direction.

92.7K 331.8K
View

Emil Kowalski's philosophy on UI polish, component design, and the invisible details that make software feel good.

43.5K 323.4K
View

Frontend design and iteration for production-grade interfaces, from concept to ship.

76.8K 313.3K
View

Reverse-engineer design tokens from public websites into starter token files for your project.

232 129.9K
View
Animate logo
Design

Animate

Builds an animation from scratch by making the decisions in the order that determines whether it feels right.

43.5K 117.9K
View

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

179.7K 114.2K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

Design AI tools

Maze Guru logo
Images

Maze Guru

Chat-to-edit AI studio for product photos, portraits, branding, and video.

Freemium
View
R
Design

RoomGPT

Generate your dream room in seconds.

Paid
View

Redesign your interior in seconds using AI

Paid
View
Reroom logo
Design

Reroom

Transform rooms with AI-generated designs.

Freemium
View
Jife logo
Design

Jife

Transform Your Space with AI-Powered Japanese Interior Designs by Jife

Paid
View
Visily logo
Design

Visily

AI-powered wireframes for non-designers.

Free
View

Revolutionize Property Viewing with AI-Generated Floor Plans and Virtual Tours

Paid
View
Archsynth logo
Design

Archsynth

Transform sketches into stunning architectural renders with AI.

Paid
View