⚠️ TLDR: With Nuxt, you can pretty much use DaisyUI Kit components liberally without worrying about bundle size. The Nuxt build process will handle it for you. Other frameworks may require some additional configuration. In addition, a lot of the previous concern with DaisyUI Kit was the size of DaisyUI css in general. Version 3 weighed in at 75k gzipped. Version 5 weighs in at 15k gzipped for everything!
When using DaisyUI Kit components, you might wonder, “How much CSS and JS do I actually ship to my users?” Here’s a transparent breakdown:
Text.vue ComponentThe text component is built around Tailwind utility classes for text styling. It supports ~70 Tailwind classes (e.g., text-primary, font-bold, etc.), conditionally applied via props. In a plain-TailwindCSS codebase, you'll likely use 1/3 of the available classes. The Tailwind build would only contain the classes you actually use. If you put them all in a component, Tailwind doesn't know which classes are used and which are not, so it will include all possible classes referenced.
Using DaisyUI Kit components instead of manually specifying Tailwind classes on every element offers several key advantages:
color="primary", align="center"). This makes usage more declarative and less error-prone than remembering and typing out long class lists.Tradeoff:
| Part | Size (Minified + Gzipped) |
|---|---|
| JS (script + template) | ~700 bytes |
| CSS (all Tailwind utilities) | ~2–3 KB |
| Total | ~3 KB |
Note:
The ~3 KB gzipped size estimate applies to the Text.vue component, which has the highest number of utility classes in DaisyUI Kit. Most other components will be even smaller—often well under 2 KB gzipped. This is extremely lightweight and production-friendly.
DaisyUI Kit is designed to work seamlessly with Nuxt. The Nuxt build process ensures:
Result: You can use DaisyUI Kit components liberally in Nuxt apps without worrying about CSS or JS bloat.
With frameworks like Astro, you may notice larger bundles by default. The Nuxt team has put a lot of work into their build process, but other frameworks may not have the same level of optimization. While Nuxt might be able to create a separate css package for individual DaisyUI Kit components, unoptimized builds in other frameworks will tend to combine all the CSS into a single file.
Take a look at the new ability for DaisyUI to include and exclude parts of the library straight from the config.
This doesn't apply to Nuxt apps, but may be useful with other frameworks. If you're highly concerned about reducing bundle size, you can consider importing and using individual components from DaisyUI Kit. Then you can manually add the individual components you need to your tailwind.config.ts file.