5,074 isometric line illustrations as SVG, PNG or React, with an MCP server
daisyUI components
68 themeable Tailwind components and 35 built-in themes.

- Website
- daisyui.com
- Pricing
- Free
- Categories
- Components
- Listed
- Mar 2023
- Updated
- Nov 2026
Details about daisyUI components
- Copy & paste
- Theming
- Open source
What Is daisyUI?
If you’ve ever felt overwhelmed by the endless list of utility classes in Tailwind CSS, daisyUI might be the solution you’ve been searching for. It’s a free, open-source library that builds on Tailwind CSS by offering a set of pre-defined, semantic class names for common UI components. Instead of manually writing 100 utility classes for every element, you can now use a simple class like btn to create a button that not only looks good but is also easy to customize.
daisyUI makes your HTML cleaner and your development process faster. The philosophy behind it is simple: let’s not re-invent the wheel for every project. Instead, leverage well-crafted components that you can adapt to your needs. Whether you’re working on a personal project or a larger commercial application, daisyUI provides the building blocks that help you focus on the unique parts of your design.
Example Tailwind classes
<div class="w-80 rounded-2xl bg-gray-100">
<div class="flex flex-col gap-2 p-8">
<input placeholder="Email" class="w-full rounded-lg border border-gray-300 bg-white px-4 py-3 focus:outline-none focus:ring-2 focus:ring-gray-700 focus:ring-offset-2 focus:ring-offset-gray-100" />
<label class="flex cursor-pointer items-center justify-between p-1">
Accept terms of use
<div class="relative inline-block">
<input type="checkbox" class="peer h-6 w-12 cursor-pointer appearance-none rounded-full border border-gray-300 bg-white checked:border-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2" />
<span class="pointer-events-none absolute start-1 top-1 block h-4 w-4 rounded-full bg-gray-400 transition-all duration-200 peer-checked:start-7 peer-checked:bg-gray-900"></span>
</div>
</label>
<label class="flex cursor-pointer items-center justify-between p-1">
Submit to newsletter
<div class="relative inline-block">
<input type="checkbox" class="peer h-6 w-12 cursor-pointer appearance-none rounded-full border border-gray-300 bg-white checked:border-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2" />
<span class="pointer-events-none absolute start-1 top-1 block h-4 w-4 rounded-full bg-gray-400 transition-all duration-200 peer-checked:start-7 peer-checked:bg-gray-900"></span>
</div>
</label>
<button class="inline-block cursor-pointer rounded-md bg-gray-700 px-4 py-3.5 text-center text-sm font-semibold uppercase text-white transition duration-200 ease-in-out hover:bg-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-700 focus-visible:ring-offset-2 active:scale-95">Save</button>
</div>
</div>Example dasyUI classes
<div class="card bg-base-200 w-80">
<div class="card-body">
<input placeholder="Email" class="input input-bordered" />
<label class="label cursor-pointer">
Accept terms of use
<input type="checkbox" class="toggle" />
</label>
<label class="label cursor-pointer">
Submit to newsletter
<input type="checkbox" class="toggle" />
</label>
<button class="btn btn-neutral">Save</button>
</div>
</div>Why It Stands Out
One of the biggest pain points in front-end development is repetitive coding. With traditional Tailwind CSS, you’re often required to write numerous utility classes for each element, which can clutter your HTML and slow down development. daisyUI tackles this with 68 components (version 5.8.3, released 26 November 2026), all built as Tailwind CSS classes.

This approach not only reduces the amount of code you write (some claim up to 80% fewer class names) but also results in a smaller DOM size. Cleaner code means easier maintenance, faster load times, and a more enjoyable coding experience.
Key Features and Benefits
1. Speedy Development
daisyUI is all about saving you time. With pre-defined classes like btn, card, and toggle, you can prototype your interface in minutes instead of hours. The reduction in class names means you spend less time debugging and more time actually building out your application.
2. Cleaner, Semantic HTML
The library promotes a more readable structure by replacing long strings of Tailwind utility classes with concise, semantic names. This makes your HTML easier to read, which is especially valuable when you or someone else revisits the code after some time.
3. Easy Customization and Theming
Built on top of Tailwind, daisyUI lets you harness all the power of Tailwind’s utility classes. Want to round the corners of a button? Just add an extra utility class like rounded-full on top of the base component. Moreover, daisyUI comes with a theme generator that allows you to define custom themes in seconds. This means you can easily change the overall look and feel of your website without rewriting large portions of your CSS.
4. Pure CSS and Framework Agnostic
Unlike some libraries that come with hefty JavaScript bundles, daisyUI is a pure CSS plugin. It works seamlessly with any JavaScript framework, or even with plain HTML. This makes it incredibly lightweight and versatile, ensuring compatibility no matter what tech stack you’re using.
Installation and Setup
Getting started with daisyUI is a breeze. If you already have a Tailwind CSS project, you can simply install the library as a development dependency using npm:
npm i -D daisyuiIn daisyUI 5 with Tailwind CSS v4 there is no tailwind.config.js step: add @import "tailwindcss"; and @plugin "daisyui"; to your main CSS file, and you’re all set. The simplicity of the setup is one of the many reasons developers appreciate daisyUI: it integrates into your existing workflow without requiring a steep learning curve.
daisyUI themes: 35 built-in themes and how to switch them
daisyUI 5.8.3 ships 35 built-in themes. Only light and dark are enabled by default; every other theme has to be turned on in your CSS before its data-theme value does anything. We checked everything in this section against the daisyUI themes documentation on 27 November 2026.
The 35 built-in daisyUI themes
light, dark, cupcake, bumblebee, emerald, corporate, synthwave, retro, cyberpunk, valentine, halloween, garden, forest, aqua, lofi, pastel, fantasy, wireframe, black, luxury, dracula, cmyk, autumn, business, acid, lemonade, night, coffee, winter, dim, nord, sunset, caramellatte, abyss, silk.
Each theme sets the same color roles (base, primary, secondary, accent, neutral, info, success, warning, error), plus corner radius, border width and the depth and noise effects. Components read those variables, so a theme switch restyles the whole page without changing any class names.
Enable themes in Tailwind CSS v4
Themes are configured in the @plugin "daisyui" block of your CSS file. --default marks the theme used when nothing else is set, and --prefersdark marks the theme used when the visitor’s system is in dark mode:
@import "tailwindcss";
@plugin "daisyui" {
themes: light --default, dark --prefersdark, cupcake;
}themes: all; enables all 35 themes, and themes: false; disables them all, which also removes daisyUI’s colors. Each enabled theme adds its variables to the CSS bundle, so list only the ones you use.
Switch themes with data-theme and the theme controller
Set the theme with a data-theme attribute, usually on the html element:
<html data-theme="cupcake"></html>For a toggle without JavaScript, use the theme controller component: a checked checkbox or radio input with the theme-controller class applies the theme named in its value, using CSS only.
<input type="checkbox" value="synthwave" class="toggle theme-controller" />The theme controller does not remember the choice after a reload. To keep it, save the value in localStorage yourself, or use the theme-change library that the daisyUI docs suggest.
Apply a theme to one section
data-theme works on any element, and nested values override the outer one. That lets you show a light card inside a dark page, or preview several themes side by side:
<html data-theme="dark">
<div data-theme="light">
This div always uses the light theme
<span data-theme="retro">This span always uses retro</span>
</div>
</html>Create a custom daisyUI theme
A custom theme is a @plugin "daisyui/theme" block after the main plugin line. It takes a name, the default and prefersdark flags, a color-scheme for browser UI, and the theme’s CSS variables. A shortened version of the documented example:
@import "tailwindcss";
@plugin "daisyui";
@plugin "daisyui/theme" {
name: "mytheme";
default: true;
prefersdark: false;
color-scheme: light;
--color-base-100: oklch(98% 0.02 240);
--color-base-content: oklch(20% 0.05 240);
--color-primary: oklch(55% 0.3 240);
--color-primary-content: oklch(98% 0.01 240);
/* secondary, accent, neutral, info, success, warning, error */
--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;
}The full theme defines a base color and a matching -content color for each role, 20 color variables in total. To adjust a built-in theme instead, use its name (for example name: "light";) and set only the variables you want to change; the rest are inherited.
The daisyUI theme generator
The daisyUI theme generator builds the same block in the browser. You start from a built-in theme or a random one, pick the colors, set the radius for boxes, fields and selectors, toggle the depth and noise effects, set sizes and border width, and preview the result on sample components. The copy button exports the CSS, which goes after @plugin "daisyui"; in your stylesheet.
Customization and Theming in Detail
One of the major draws of daisyUI is how easy it is to customize. Because the components are built with Tailwind’s utility classes at their core, you have full control over how they appear. Need to adjust the padding, change the background color, or modify the border radius? Just add or override the utility classes as needed.
The theme generator is another standout feature. It lets you pick your color palette and apply it across all components instantly. This built-in theming support ensures that every element on your website maintains a consistent look, whether you’re aiming for a modern, minimalist design or something more vibrant and bold.
For instance, you might start with a default theme and then quickly switch to a custom scheme by modifying just a few color variables. This flexibility is invaluable when you’re working on projects with evolving design requirements or when you need to adhere to strict branding guidelines.
Real-World Use Cases
Rapid Prototyping
For developers who need to get a project off the ground quickly, daisyUI offers a huge advantage. By reducing the amount of code you have to write, it allows you to create prototypes faster. This is particularly useful for startups or freelancers who need to iterate on their designs rapidly.
Production-Quality Websites
Even though it’s fantastic for prototypes, daisyUI isn’t just a temporary tool. Its well-crafted components are robust enough for production. Many developers have successfully used it to build landing pages, dashboards, and even full-scale web applications. The library’s emphasis on clean, semantic HTML makes it easier to scale your projects as they grow in complexity.
Educational Purposes
For those learning front-end development, daisyUI provides a great starting point. It offers an easy way to understand how components can be structured without getting lost in a sea of utility classes. As you grow more comfortable, you can gradually explore Tailwind’s more advanced features and even customize the provided components to better suit your needs.
Performance and Efficiency
A key benefit of daisyUI is its impact on performance. Since the library helps reduce the overall number of class names in your HTML, the resulting file size is smaller. Some developers report that their HTML becomes up to 70% smaller, which can lead to faster page load times and better overall performance.
Moreover, because daisyUI is pure CSS with no JavaScript dependencies, there’s no extra overhead that might slow down your site. This lightweight approach ensures that your pages remain snappy, even as they become more complex.
Community and Support
One of the strongest aspects of daisyUI is its vibrant community. With tens of thousands of stars on GitHub, a growing number of open-source projects using it, and active discussion channels on platforms like Discord, you’re never far from support. The community is friendly and always eager to help, whether you’re troubleshooting an issue or looking for inspiration on how to customize a component.
The library is frequently updated, and its roadmap is transparent. Many users appreciate the continuous improvements and the responsiveness of the maintainers, which contributes to a positive overall experience.
Comparison to Other Options
While there are many component libraries out there, daisyUI has carved its own niche by focusing on simplicity and flexibility. For instance, traditional frameworks like Bootstrap offer pre-styled components but can be rigid in terms of customization. In contrast, daisyUI leverages the power of Tailwind CSS, giving you the best of both worlds: pre-built components that are easy to use, yet fully customizable with Tailwind’s utility classes.
Other Tailwind-based libraries might offer similar benefits, but daisyUI stands out for its semantic class names and integrated theming capabilities. It strikes a balance between ease of use and control, a combination that many developers find incredibly appealing.
Limitations and Considerations
No tool is perfect, and daisyUI is no exception. While its pre-built components cover a wide range of use cases, there might be times when you need to create something entirely unique. In those cases, you might still have to rely on raw Tailwind CSS to craft custom solutions. Additionally, because it builds on top of Tailwind, you’ll need a basic understanding of Tailwind’s utility classes to fully harness the power of daisyUI.
Another point to consider is that while daisyUI helps keep your HTML clean, there can be a learning curve when it comes to customizing themes and components beyond the default settings. However, the extensive documentation and active community help mitigate these challenges.
FAQ
What exactly is daisyUI?
It’s a free, open-source component library built on Tailwind CSS that offers pre-made, semantic classes.
How does daisyUI speed up development?
It cuts down on repetitive utility classes, leading to cleaner HTML and quicker prototyping.
Can I easily customize the components?
Yes, you can tailor styles using Tailwind’s utilities and a built-in theme generator.
Is it compatible with various frameworks?
Absolutely. It works with any framework or even plain HTML since it’s pure CSS.
How many themes does daisyUI have?
daisyUI 5.8.3 has 35 built-in themes, from light, dark and cupcake to the newer caramellatte, abyss and silk. Only light and dark are enabled by default; add others with themes: in the @plugin "daisyui" block, or use themes: all.
How do I switch daisyUI themes?
Set data-theme="theme-name" on the html element or on any section. For a toggle without JavaScript, use the theme-controller component, a checkbox or radio input whose value is the theme name. The theme must be enabled in your CSS first.
The best developer tools, templates and UI components added to Tailkits, each reviewed by an editor. Free, unsubscribe in one click.
26 new in the last 30 days324 products reviewed so farSee what you get
Do you make daisyUI components? Get a badge for your site
An optional "Featured on Tailkits" badge that links to this page. Pick light or dark and paste the code into your site, for example in the footer.


