Loading...
Loading...
Use when building with DaisyUI — Tailwind CSS component class library. Covers class naming conventions, component classes (btn, card, modal, drawer, tab, badge, alert, etc.), color modifiers, size modifiers, theming with data-theme and CSS variables, OKLch colors, responsive patterns, installation, and class reference lookup via MCP tools.
npx skill4agent add peixotorms/odinlayer-skills daisyuibtncardmodaldata-themefrontend-componentsdaisyuinpm install daisyui@import "tailwindcss";
@plugin "daisyui";// tailwind.config.js
module.exports = {
plugins: [require("daisyui")],
}list_components(framework: "daisyui")# Get full class reference + examples for a component
get_component(framework: "daisyui", category: "components", component_type: "all", variant: "button")
get_component(framework: "daisyui", category: "components", component_type: "all", variant: "card")
get_component(framework: "daisyui", category: "components", component_type: "all", variant: "modal")search_components(query: "input", framework: "daisyui")
search_components(query: "nav", framework: "daisyui")| Component | Base Class | Purpose |
|---|---|---|
| Button | | Clickable button element |
| Card | | Content container with padding |
| Modal | | Dialog overlay |
| Drawer | | Side panel |
| Navbar | | Top navigation bar |
| Footer | | Page footer |
| Tab | | Tab navigation item |
| Badge | | Small status indicator |
| Alert | | Notification banner |
| Table | | Data table |
| Menu | | Vertical or horizontal menu |
| Dropdown | | Dropdown container |
| Tooltip | | Hover tooltip |
| Toggle | | Toggle switch |
| Checkbox | | Checkbox input |
| Radio | | Radio input |
| Input | | Text input field |
| Select | | Select dropdown |
| Textarea | | Multi-line input |
| Range | | Range slider |
| Rating | | Star rating |
| Progress | | Progress bar |
| Loading | | Loading spinner |
| Collapse | | Collapsible content |
| Accordion | | Accordion group |
| Carousel | | Image/content slider |
| Countdown | | Timer countdown |
| Diff | | Before/after comparison |
| Divider | | Content separator |
| Indicator | | Corner badge/notification |
| Join | | Group items together |
| Kbd | | Keyboard key display |
| Link | | Styled anchor link |
| Mask | | Shape mask for images |
| Mockup | | Device mockups |
| Skeleton | | Loading placeholder |
| Stack | | Stacked elements |
| Stat | | Statistics display |
| Steps | | Step indicator |
| Swap | | Content toggle |
| Toast | | Toast notification |
| Timeline | | Event timeline |
| Hero | | Hero section |
{component}-{color}| Color | Purpose | Example |
|---|---|---|
| Main brand action | |
| Secondary actions | |
| Accent/highlight | |
| Neutral/default | |
| Informational | |
| Success state | |
| Warning state | |
| Error/danger state | |
| Transparent/subtle | |
| Size | Modifier | Example |
|---|---|---|
| Extra small | | |
| Small | | |
| Medium (default) | | |
| Large | | |
| Extra large | | |
| Style | Modifier | Example |
|---|---|---|
| Outline | | |
| Dash | | |
| Soft | | |
| Ghost | | |
| Link | | |
| Glass | | |
| Shape | Modifier | Example |
|---|---|---|
| Wide | | |
| Block (full width) | | |
| Square (1:1) | | |
| Circle | | |
data-theme<html data-theme="light">
<html data-theme="dark">
<html data-theme="cupcake">
<html data-theme="retro">
<html data-theme="cyberpunk">
<html data-theme="valentine">
<html data-theme="garden">
<html data-theme="forest">
<html data-theme="lofi">
<html data-theme="dracula">
<html data-theme="business">
<html data-theme="night"><html><div data-theme="dark">
<!-- Dark themed section -->
<button class="btn btn-primary">Dark button</button>
</div>
<div data-theme="light">
<!-- Light themed section -->
<button class="btn btn-primary">Light button</button>
</div>[data-theme="mytheme"] {
--color-primary: oklch(65% 0.25 260);
--color-primary-content: oklch(98% 0 0);
--color-secondary: oklch(70% 0.2 180);
--color-secondary-content: oklch(98% 0 0);
--color-accent: oklch(75% 0.18 80);
--color-accent-content: oklch(20% 0 0);
--color-neutral: oklch(30% 0.02 260);
--color-neutral-content: oklch(95% 0 0);
--color-base-100: oklch(98% 0.01 260);
--color-base-200: oklch(95% 0.01 260);
--color-base-300: oklch(90% 0.01 260);
--color-base-content: oklch(20% 0.02 260);
--color-info: oklch(70% 0.15 230);
--color-success: oklch(70% 0.2 150);
--color-warning: oklch(80% 0.18 80);
--color-error: oklch(65% 0.25 25);
--radius-selector: 0.5rem;
--radius-field: 0.25rem;
--radius-box: 0.5rem;
--size-selector: 0.25rem;
--size-field: 0.25rem;
--border: 1px;
--depth: 1;
--noise: 0;
}| Variable | Purpose |
|---|---|
| Primary brand color |
| Text on primary |
| Secondary color |
| Accent color |
| Neutral color |
| Base background |
| Slightly darker bg |
| Even darker bg |
| Text on base |
| Info state |
| Success state |
| Warning state |
| Error state |
| Border radius for selectors |
| Border radius for fields |
| Border radius for boxes |
<div class="card bg-base-100 shadow-xl">
<figure><img src="..." alt="..." /></figure>
<div class="card-body">
<h2 class="card-title">Title</h2>
<p>Description text</p>
<div class="card-actions justify-end">
<button class="btn btn-primary">Action</button>
</div>
</div>
</div><button class="btn" onclick="my_modal.showModal()">Open</button>
<dialog id="my_modal" class="modal">
<div class="modal-box">
<h3 class="text-lg font-bold">Title</h3>
<p class="py-4">Content</p>
<div class="modal-action">
<form method="dialog">
<button class="btn">Close</button>
</form>
</div>
</div>
<form method="dialog" class="modal-backdrop">
<button>close</button>
</form>
</dialog><div class="navbar bg-base-100">
<div class="flex-1">
<a class="btn btn-ghost text-xl">Brand</a>
</div>
<div class="flex-none">
<ul class="menu menu-horizontal px-1">
<li><a>Link 1</a></li>
<li><a>Link 2</a></li>
</ul>
</div>
</div><div class="form-control w-full max-w-xs">
<label class="label">
<span class="label-text">Email</span>
</label>
<input type="email" placeholder="email@example.com" class="input input-bordered w-full max-w-xs" />
<label class="label">
<span class="label-text-alt">Helper text</span>
</label>
</div><div class="drawer lg:drawer-open">
<input id="drawer" type="checkbox" class="drawer-toggle" />
<div class="drawer-content">
<!-- Page content -->
<label for="drawer" class="btn btn-primary drawer-button lg:hidden">Menu</label>
</div>
<div class="drawer-side">
<label for="drawer" class="drawer-overlay"></label>
<ul class="menu bg-base-200 text-base-content min-h-full w-80 p-4">
<li><a>Item 1</a></li>
<li><a>Item 2</a></li>
</ul>
</div>
</div><!-- Small button on mobile, large on desktop -->
<button class="btn btn-sm lg:btn-lg">Responsive</button>
<!-- Stack on mobile, horizontal on desktop -->
<div class="flex flex-col lg:flex-row gap-4">
<div class="card bg-base-100 shadow">...</div>
<div class="card bg-base-100 shadow">...</div>
</div><button class="btn btn-primary w-full mt-4 shadow-lg">
Full width primary button with margin and shadow
</button>
<div class="card bg-base-100 shadow-xl max-w-md mx-auto">
Centered card with max width
</div>| Don't | Do Instead |
|---|---|
| |
| Manually define color schemes | Use |
Hard-code colors like | Use |
| Mix DaisyUI component classes with conflicting Tailwind utilities | DaisyUI base classes first, then Tailwind overrides |
| Create custom CSS for standard components | Check DaisyUI component library first |
| Step | Action |
|---|---|
| 1. Identify component | What UI element is needed? |
| 2. Check reference | |
| 3. Use base class | Apply the component's base class |
| 4. Add modifiers | Color, size, style modifiers as needed |
| 5. Add Tailwind | Layer Tailwind utilities for spacing, layout |
| 6. Theme | Set |