daisyui-usage

Installation
SKILL.md

daisyUI 5 usage rules

  1. We can give styles to a HTML element by adding daisyUI class names to it. By adding a component class name, part class names (if there's any available for that component), and modifier class names (if there's any available for that component)
  2. Components can be customized using Tailwind CSS utility classes if the customization is not possible using the existing daisyUI classes. For example btn px-10 sets a custom horizontal padding to a btn
  3. If customization of daisyUI styles using Tailwind CSS utility classes didn't work because of CSS specificity issues, you can use the ! at the end of the Tailwind CSS utility class to override the existing styles. For example btn bg-red-500! sets a custom background color to a btn forcefully. This is a last resort solution and should be used sparingly
  4. If a specific component or something similar to it doesn't exist in daisyUI, you can create your own component using Tailwind CSS utility
  5. when using Tailwind CSS flex and grid for layout, it should be responsive using Tailwind CSS responsive utility prefixes.
  6. Only allowed class names are existing daisyUI class names or Tailwind CSS utility classes.
  7. Ideally, you won't need to write any custom CSS. Using daisyUI class names or Tailwind CSS utility classes is preferred.
  8. Suggested - if you need placeholder images, use https://picsum.photos/200/300 with the size you want
  9. Suggested - when designing, don't add a custom font unless it's necessary
  10. Don't add bg-base-100 text-base-content to body unless it's necessary
  11. For design decisions, use Refactoring UI book best practices
  12. Always use the default variant of daisyUI components unless the user asked for a specific variant or color
Installs
1
GitHub Stars
41.1K
First Seen
2 days ago
daisyui-usage — saadeghi/daisyui