nuxtui custom background color on homepage
How would I override the default background color on only the homepage? I am using nuxtUI v3
3 Replies
Hi @Isaac. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To override the default background color on only the homepage in Nuxt UI v3, you have a few approaches:
Using CSS for a specific page
You can create a custom CSS class for your homepage and apply it to the page component:
1. First, make sure you have your CSS file imported in your project:
2. Then in your homepage component (e.g.,
pages/index.vue
), apply the class:
Using Tailwind classes directly
You can also use Tailwind classes directly on your homepage component:
Using Nuxt UI's design tokens
Nuxt UI v3 uses CSS variables as design tokens for consistent styling. You can leverage these tokens in your homepage component:
These approaches allow you to customize the background color specifically for your homepage while maintaining the Nuxt UI theming system throughout the rest of your application.
For more information about Nuxt UI's theming system, you can refer to the Nuxt UI Theme documentation.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@1186308628748181584> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Actually found solution with useHead