NuxtN
Nuxt12mo ago
TechAkayy

Nuxt UI without app.config.ts

Defining primary color via the app.config.ts lets us change the theme of our app at runtime (the palette button in the docs, also noted in the screenshot. My understanding is that app.config.ts provide the means to change our theme at runtime. But, I'm not really interested in changing my theme at runtime. Rather, I want to define a primary color and be able to use it in my default theme and for the color prop in various components.

How can I achieve this in Nuxt UI? Is it possible to define primary color apart from the app.config.ts way, may be under the ui key in
nuxt.config.ts
itself? I have the same question about overriding component config also via app.config.ts. Please correct me if I'm misunderstanding the purpose and usage of app.config.ts. Thanks!
Theming.jpg
Was this page helpful?