daisyui

daisyUI 5 component library reference for Tailwind CSS 4. Use this when writing UI components with daisyUI class names.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "daisyui" with this command: npx skills add pzyyll/ai-agents/pzyyll-ai-agents-daisyui

daisyUI 5

daisyUI 5 is a CSS library for Tailwind CSS 4 that provides class names for common UI components.

When to use this skill

Use this skill when:

  • Building UI components with daisyUI 5
  • Need reference for daisyUI class names and usage rules
  • Customizing themes with daisyUI config
  • Understanding daisyUI color system
  • Following best practices for daisyUI component styling
  • Refactoring UI with daisyUI components
  • Learning how to use daisyUI 5 effectively in Tailwind CSS 4 projects

Installation

install guide

  1. daisyUI 5 requires Tailwind CSS 4
  2. tailwind.config.js is deprecated in Tailwind CSS v4. Use CSS file only.
  3. Install: npm i -D daisyui@latest
  4. CSS file setup:
@import "tailwindcss";
@plugin "daisyui";

CDN alternative:

<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

Usage Rules

  1. Style elements by adding component class + part classes + modifier classes
  2. Customize with Tailwind CSS utility classes (e.g., btn px-10)
  3. Use ! suffix to override specificity issues (e.g., btn bg-red-500!) - last resort
  4. Create custom components with Tailwind utilities if daisyUI doesn't have it
  5. Use Tailwind responsive prefixes for flex and grid layouts
  6. Only use daisyUI class names or Tailwind CSS utility classes
  7. Avoid custom CSS - prefer daisyUI/Tailwind classes
  8. Placeholder images: https://picsum.photos/200/300
  9. Don't add custom fonts unless necessary
  10. Don't add bg-base-100 text-base-content to body unless necessary
  11. Follow Refactoring UI best practices

Class Name Categories

  • component: required component class
  • part: child part of component
  • style: specific style modifier
  • behavior: behavior modifier
  • color: color modifier
  • size: size modifier
  • placement: placement modifier
  • direction: direction modifier
  • modifier: general modifier
  • variant: conditional prefix (syntax: variant:utility-class)

Config

config docs

Basic:

@plugin "daisyui";

Light theme only:

@plugin "daisyui" {
	themes: light --default;
}

Full config:

@plugin "daisyui" {
	themes:
		light --default,
		dark --prefersdark;
	root: ":root";
	include:;
	exclude:;
	prefix:;
	logs: true;
}

Colors

Color Names

ColorDescription
primaryPrimary brand color
primary-contentForeground on primary
secondarySecondary brand color
secondary-contentForeground on secondary
accentAccent brand color
accent-contentForeground on accent
neutralNeutral dark color
neutral-contentForeground on neutral
base-100Base surface color
base-200Darker base shade
base-300Even darker base shade
base-contentForeground on base
infoInfo messages
info-contentForeground on info
successSuccess messages
success-contentForeground on success
warningWarning messages
warning-contentForeground on warning
errorError messages
error-contentForeground on error

Color Rules

  1. Use in utility classes like bg-primary, text-base-content
  2. Colors change automatically based on theme
  3. No need for dark: prefix with daisyUI colors
  4. Avoid Tailwind color names (e.g., red-500) - they don't adapt to themes
  5. Use base-* colors for majority of page, primary for important elements

Custom Theme

@plugin "daisyui/theme" {
	name: "mytheme";
	default: true;
	prefersdark: false;
	color-scheme: light;

	--color-base-100: oklch(98% 0.02 240);
	--color-base-200: oklch(95% 0.03 240);
	--color-base-300: oklch(92% 0.04 240);
	--color-base-content: oklch(20% 0.05 240);
	--color-primary: oklch(55% 0.3 240);
	--color-primary-content: oklch(98% 0.01 240);
	--color-secondary: oklch(70% 0.25 200);
	--color-secondary-content: oklch(98% 0.01 200);
	--color-accent: oklch(65% 0.25 160);
	--color-accent-content: oklch(98% 0.01 160);
	--color-neutral: oklch(50% 0.05 240);
	--color-neutral-content: oklch(98% 0.01 240);
	--color-info: oklch(70% 0.2 220);
	--color-info-content: oklch(98% 0.01 220);
	--color-success: oklch(65% 0.25 140);
	--color-success-content: oklch(98% 0.01 140);
	--color-warning: oklch(80% 0.25 80);
	--color-warning-content: oklch(20% 0.05 80);
	--color-error: oklch(65% 0.3 30);
	--color-error-content: oklch(98% 0.01 30);

	--radius-selector: 1rem;
	--radius-field: 0.25rem;
	--radius-box: 0.5rem;
	--size-selector: 0.25rem;
	--size-field: 0.25rem;
	--border: 1px;
	--depth: 1;
	--noise: 0;
}

Theme generator: https://daisyui.com/theme-generator/


Component Index

Load component docs on-demand from components/ folder.

ComponentFileDescription
accordionaccordion.mdShow/hide content, one item open at a time
alertalert.mdInform users about important events
avataravatar.mdShow thumbnails/profile images
badgebadge.mdStatus indicators on data
breadcrumbsbreadcrumbs.mdNavigation trail
buttonbutton.mdUser action triggers
calendarcalendar.mdDate picker styles (Cally/Pikaday/React Day Picker)
cardcard.mdGroup and display content
carouselcarousel.mdScrollable image/content area
chatchat.mdConversation bubbles
checkboxcheckbox.mdSelect/deselect values
collapsecollapse.mdShow/hide content (single)
countdowncountdown.mdAnimated number transitions
diffdiff.mdSide-by-side comparison
dividerdivider.mdSeparate content
dockdock.mdBottom navigation bar
drawerdrawer.mdSidebar layout
dropdowndropdown.mdMenu on button click
fabfab.mdFloating action button
fieldsetfieldset.mdForm element grouping
file-inputfile-input.mdFile upload field
filterfilter.mdRadio button filter group
footerfooter.mdPage footer
herohero.mdLarge display box with title
hover-3dhover-3d.md3D hover effect wrapper
hover-galleryhover-gallery.mdImage gallery on hover
indicatorindicator.mdCorner element placement
inputinput.mdText input field
joinjoin.mdGroup items together
kbdkbd.mdKeyboard shortcut display
labellabel.mdInput field labels
linklink.mdStyled anchor links
listlist.mdVertical info rows
loadingloading.mdLoading animations
maskmask.mdShape cropping
menumenu.mdLink list navigation
mockup-browsermockup-browser.mdBrowser window mockup
mockup-codemockup-code.mdCode editor mockup
mockup-phonemockup-phone.mdiPhone mockup
mockup-windowmockup-window.mdOS window mockup
modalmodal.mdDialog/popup box
navbarnavbar.mdTop navigation bar
paginationpagination.mdPage navigation buttons
progressprogress.mdProgress bar
radial-progressradial-progress.mdCircular progress
radioradio.mdSingle option selection
rangerange.mdSlider input
ratingrating.mdStar rating
selectselect.mdDropdown selection
skeletonskeleton.mdLoading placeholder
stackstack.mdStacked elements
statstat.mdNumber/data display
statusstatus.mdSmall status icon
stepssteps.mdProcess steps
swapswap.mdToggle visibility
tabtab.mdTabbed navigation
tabletable.mdData table
text-rotatetext-rotate.mdRotating text animation
textareatextarea.mdMulti-line text input
theme-controllertheme-controller.mdTheme switcher
timelinetimeline.mdChronological events
toasttoast.mdCorner notifications
toggletoggle.mdSwitch button
tooltiptooltip.mdHover message
validatorvalidator.mdForm validation styles

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

reka-ui

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

MemVault

Production-ready long-term memory server for AI agents with Ebbinghaus decay and strength-weighted retrieval. Use when you need persistent memory across agen...

Registry SourceRecently Updated
0184
Profile unavailable
Automation

AIT Community

Interact with AIT Community (aitcommunity.org) - an AI engineering community platform. Use when asked to post forum threads, reply to discussions, read commu...

Registry SourceRecently Updated
0230
Profile unavailable