NuxtUI components are displayed without styling
Hey! I started exploring development with Nuxt4 and NuxtUI. I have kickstarted a project using the normal commands from official docs. However, the components I use from NuxtUI are displayed without any styling at all. I have searched some slight configuration changes through tutorials and other resources but it doesn't seem to help at all. I assume that it's something pretty straightforward, since I used only the default commands and configurations to create my project.
Below I include the code for the basic parts to help with resolution along with the page in browser.
Thanks in advance for any help! 🙏
nuxt.config.ts
assets/css/main.css
app.vue
layouts/default.vue
pages/index.vue

26 Replies
Hi @lezaf_. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
It looks like you’ve set up most things correctly, but there are a couple of common reasons why Nuxt UI components might render without styling:
1. CSS File Not Loaded Globally
You have created
- Nuxt UI Installation Guide - Nuxt UI Theme Customization ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
assets/css/main.css and imported both Tailwind and Nuxt UI CSS, which is correct:
However, you must ensure this CSS file is loaded globally in your Nuxt app. This is done by adding it to the css property in your nuxt.config.ts:
If you miss this step, the styles will not be applied to your components, and they will appear unstyled Nuxt UI Installation Guide.
---
2. Module Order and Redundancy
You do not need to add both @nuxt/ui and @nuxtjs/tailwindcss to the modules array. The @nuxt/ui module already includes Tailwind CSS configuration for you. You can safely remove @nuxtjs/tailwindcss unless you have a specific reason to customize Tailwind separately Nuxt UI Installation Guide.
---
3. Wrapping with <UApp>
You are correctly wrapping your layout with <UApp>, which is required for global config and overlays.
---
4. File Paths
Double-check that your CSS file is at assets/css/main.css (not app/assets/css/main.css unless you have changed the default directory structure).
---
Summary of Fix
Update your nuxt.config.ts to include the CSS file:
Remove @nuxtjs/tailwindcss from modules unless you need it for custom configuration.
---
After making these changes, restart your dev server. Your Nuxt UI components should now be styled correctly.
If you still have issues, ensure there are no build errors and that your browser is not caching old assets.
---
References:- Nuxt UI Installation Guide - Nuxt UI Theme Customization ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
<@806506236077015121> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
hey you dont need nuxtjs/tailwindcss if you have @nuxt/ui
and you have to add in your config the css path file
@Andrew Barney I updated my nuxt.config.ts with:
and my main.css with:
And still nothing.
ur main.css has to be
@lezaf_
nuxt/ui by default uses tailwind v4
@Andrew Barney With this I get following error
[plugin:@tailwindcss/vite:generate:serve] Can't resolve 'tailwindcss' in '~/app/assets/css'Yes, I understand that NuxtUI handles tailwind by default, and I have tried the default settings and setup from the docs but still can't make it work. 😕
delete node_modules and make sure u uninstalled the old package nuxtjs/tailwindcss
and then reinstall all packages
So you suggest I shouldn't have either in my package.json tailwind import:
yes remove "@nuxtjs/tailwindcss":
@Andrew Barney It worked! It was the package.json entry that was conflicting. Thanks a lot! But why it was included if it conflicts with NuxtUI?
i assume because nuxtjs/tailwindcss uses old tailwind
not all packages from the nuxt modules page are updated to nuxt 4 and latest packages maybe
and it wasn't included, maybe you asked ai how to install tailwindcss?
Yeah I see, it's too soon, yet.
and it gave you that
Actually I didn't. I just run the commands from the docs, nothing more.
not sure, i was confused how to install tailwind too
i still don't know how i can install tailwind by itself
without nuxt/ui
I don't quite remember if in the Nuxt project cli commands, tailwindcss was in the list of modules to install along with nuxtui and I opt in there.
i don't like how nuxt/ui is, coming from react and i was using shadcn
so i'm using reka-ui which nuxt/ui is built on top of
and that's like radix-ui which shadcn is built on
Is it more mature as a component library? I chose NuxtUI because it's the official, but I could try another one if it worths
nuxtui is built on top of reka-ui
are you just learning web dev or you're coming from react or some other framework?
I am experimenting with frameworks and my web background is a bit of Angular and Vue.
nice
i have a long experience with react (nextjs) but i got annoyed how it works and i like how nuxt (vue) works
Ah, I see. So what would be your recommendation for component library in nuxt? reka-ui directly?
well since you're not coming from react then you will maybe like how nuxtui works, but you can look at how reka-ui is
I don't like how nuxtui is because they have component variants and it's a little different to customize
you have to customize in the config everything style related
but in reka-ui if you look, you can customize where you use it always
example:
reka-ui
nuxt/ui
So for reka you can customize where you use it, you add class="bla bla bla"
but for nuxt/ui in the nuxt config you have to make variants for each component and customize it
you may find it cleaner in some cases, but maybe more annoying
so it all depends on your perspective
Ok, I get your point! Great explanation with the examples. I'll maybe try both and decide, I guess!
Thanks a lot for you help!
👐
np, if you ever have any questions you can dm i'll try to help you
yeah sure! thanks!