Daisyui components

From oyi77/1ai-skills · View interactive version

Daisyui components is an AI agent skill from the GitHub repository oyi77/1ai-skills. Use when daisyUI component library for Tailwind — themed components, colors, responsive, dark mode.

How to use this skill

Skill file

Overview

daisyUI adds component classes to Tailwind CSS — buttons, cards, modals, dropdowns, etc. — without JavaScript. Uses Tailwind's plugin system with theme customization via CSS variables.

Capabilities

When to Use

Trigger phrases:

When NOT to Use

Pseudo Code

The daisyui-components workflow follows a standard pipeline pattern.

Core flow:

# daisyui-components primary flow
input = prepare(raw_data)
result = process(input, config={colors, component, components, daisyui, dark})
validate(result)
deliver(result)

Error handling:

on error:
  log(error_details)
  retry_with_backoff(max=3)
  if still_failing: alert_and_escalate()

Core Workflow

# daisyui-components primary flow
input = prepare(raw_data)
result = process(input, config={colors, component, components, daisyui, dark})
validate(result)
deliver(result)

Error Handling

on error:
  log(error_details)
  retry_with_backoff(max=3)
  if still_failing: alert_and_escalate()

Installation

npm install daisyui
// tailwind.config.js
module.exports = {
  plugins: [require("daisyui")],
  daisyui: {
    themes: ["light", "dark", "corporate"],
    darkTheme: "dark",
  },
}

Component Usage

<!-- Button -->
<button class="btn btn-primary">Click Me</button>
<button class="btn btn-outline btn-secondary">Outline</button>

<!-- Card -->
<div class="card bg-base-100 shadow-xl">
  <figure><img src="/photo.jpg" alt="Photo" /></figure>
  <div class="card-body">
    <h2 class="card-title">Title</h2>
    <p>Content</p>
    <div class="card-actions justify-end">
      <button class="btn btn-primary">Action</button>
    </div>
  </div>
</div>

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

Dark Mode Toggle

<label class="swap swap-rotate">
  <input type="checkbox" data-toggle-theme="dark,light" />
  <div class="swap-on">🌙</div>
  <div class="swap-off">☀️</div>
</label>

Common Patterns

How to Use

  1. Define content goal (traffic, engagement, conversion, brand awareness)
  2. Research target audience pain points and search intent
  3. Generate content using appropriate AI tools
  4. Edit and humanize output for authenticity
  5. Optimize for target platform (SEO, hashtags, format)
  6. Schedule and distribute across channels
  7. Measure performance and iterate

Red Flags

Verification

Process

  1. Analyze the task requirements
  2. Apply domain expertise
  3. Verify output quality

Anti-Rationalization Table

| Rationalization | Reality |

|---|---|

| "Good enough content works" | Quality content drives engagement. Mediocre content gets ignored. |

| "I will optimize later" | SEO and distribution need optimization from the start. |

| "Templates are good enough" | Templates are a starting point. Custom content outperforms generic. |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.