
daisyUI Usage
SkillUsage rules for daisyUI 5: combine component, part and modifier classes, add Tailwind utilities when needed and the ! override only as a last resort, use the default variant unless asked, make layouts responsive, and follow Refactoring UI for design choices. Part of the official daisyUI skill.
name: daisyui-usage
description: Usage rules that you must use with daisyUI 5
daisyUI 5 usage rules
- To style an HTML element, add daisyUI class names to it. Add the necessary component class name. Also add the applicable part and modifier class names.
- If the current daisyUI classes cannot make a necessary change, use Tailwind CSS utility classes. For example,
btn px-10sets custom horizontal padding on abtn. - If CSS specificity prevents a change to a daisyUI style, add
!to the end of the Tailwind utility. For example,btn bg-red-500!overrides the background color of abtn. Use this method only if other methods do not work. Do not use it frequently. - If daisyUI does not have an applicable component, make a component with Tailwind CSS utilities.
- When you use Tailwind CSS
flexorgridfor a layout, add responsive utility prefixes. - Use only current daisyUI class names or Tailwind CSS utility classes.
- If custom CSS is not necessary, do not write it. If possible, use daisyUI class names or Tailwind CSS utility classes.
- If you need placeholder images, use https://picsum.photos/200/300 with the necessary dimensions.
- If a custom font is not necessary, do not add one.
- If
bg-base-100 text-base-contentis not necessary, do not add it to the body. - For design decisions, use the methods in the Refactoring UI book.
- If the user does not request a variant or color, use the default variant. For example, use
btnfor a button. If the user does not request that variant, do not usebtn btn-primary.
Each daisyUI 5 class name is in one of these categories. These category names are for reference only. Do not use them in code.
component: The necessary component class.part: A child part of a component.style: Sets a specified style on a component or part.behavior: Changes the behavior of a component or part.color: Sets a specified color on a component or part.size: Sets a specified size on a component or part.placement: Sets a specified position for a component or part.direction: Sets a specified direction for a component or part.modifier: Changes the component or part in a specified way.variant: A prefix for a utility class that applies styles in specified conditions. The syntax isvariant:utility-class.
Change a component in CSS
Use the Tailwind @utility directive to change a daisyUI component globally:
@utility btn {
@apply rounded-full;
}
daisyUI utilities and variables
- You can use semantic colors with Tailwind color utilities and opacity modifiers. Examples are
bg-primary,border-base-300, andtext-base-content/60. rounded-box,rounded-field, androunded-selectoruse the radius tokens of the active theme.glassapplies the daisyUI glass effect.- Some components supply CSS variables for component-specific changes. Countdown uses
--valueand--digits. Radial progress uses--sizeand--thickness.
Base modules
daisyUI includes the properties, rootcolor, scrollbar, rootscrolllock, rootscrollgutter, and svg base modules. To exclude a module from the plugin configuration, use its module name:
@plugin "daisyui" {
exclude: rootscrollgutter;
}
Use include or exclude for library modules. For visual changes, use Tailwind utilities or @utility.
Ressources associées

daisyUI
SkillOfficial daisyUI skill: the agent uses daisyUI 5 component classes, semantic colors and themes whenever it writes HTML or JSX, picking components by intended function, reading their guides and following their exact structure. Includes install, usage, config and color guides. Built on Tailwind CSS 4.
saadeghi/daisyui42.6k
Web Artifacts Builder
SkillBuilds multi-component web pages that need state or routing with React, Tailwind CSS and shadcn/ui, using bundled init and build scripts, then packs them into a single HTML file for a claude.ai Artifact. Official Anthropic skill.
anthropics/skills182k
shadcn/ui
SkillOfficial shadcn/ui skill: uses the shadcn CLI to read project config and component docs, then adds, searches, composes and fixes components following styling, form and accessibility rules. Can also start new projects from presets.
shadcn-ui/ui126k
daisyUI Colors
SkillColor rules for daisyUI 5: explains semantic names such as primary, base-100 and error with their -content foregrounds, says to prefer them over fixed Tailwind colors and never add dark: to them, and shows how to enable, create and override themes. Part of the official daisyUI skill.
saadeghi/daisyui42.6k
daisyUI Config
SkillConfiguration reference for daisyUI 5: how to set enabled themes, the default and prefers-dark theme, root selector, included or excluded modules, class prefix and console logs in the CSS plugin block, with full examples. Part of the official daisyUI skill.
saadeghi/daisyui42.6k
daisyUI Install
SkillInstallation guide for daisyUI 5: requires Tailwind CSS 4 without tailwind.config.js, installs via npm and adds the plugin in CSS, covers the CDN setup, and links framework guides for Next.js, Vue, SvelteKit, Laravel and more. Part of the official daisyUI skill.
saadeghi/daisyui42.6k