daisyUI 5
Implement UI with valid daisyUI 5 and Tailwind CSS 4 patterns. Prefer daisyUI component classes first, then Tailwind utilities for layout/spacing/overrides.
Workflow
- •Confirm stack assumptions:
- •Use Tailwind CSS 4 syntax.
- •Avoid
tailwind.config.jsguidance unless the project explicitly requires legacy behavior.
- •Set up styles correctly:
- •Ensure CSS includes
@import "tailwindcss";. - •Ensure CSS includes
@plugin "daisyui";. - •Add
@plugin "daisyui/theme"only when a custom theme is requested.
- •Build UI with class discipline:
- •Use only daisyUI classes and Tailwind utility classes.
- •Prefer semantic daisyUI colors (
primary,base-100,error, etc.) over fixed Tailwind colors. - •Use responsive utilities for flex/grid layouts.
- •Avoid custom CSS unless class-based solutions are insufficient.
- •Apply component syntax exactly:
- •Follow component class names, parts, modifiers, and rules from the reference file.
- •Preserve required structure for components (for example accordion, modal, dropdown patterns).
- •Validate output before finishing:
- •Check for invalid or non-existent daisyUI classes.
- •Check text/background contrast with
*-contentcolors. - •Check light/dark behavior through theme semantics (avoid unnecessary
dark:for daisyUI semantic colors).
Reference
- •Core guidance and component catalog:
references/usage-guide.md
When searching the reference quickly, use these patterns:
- •
^## daisyUI 5 install notes - •
^## daisyUI 5 usage rules - •
^## Config - •
^## daisyUI 5 colors - •
^### [a-z0-9-]+$(component sections)