Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Build a Nuxt UI v4 theme in layers: define your design tokens in the project CSS, map semantic colors and shared component defaults in app.config.ts, then use <UTheme> or component props for narrower exceptions. This keeps a consistent system without repeating unrelated utility classes across templates.

Where does Nuxt UI v4 theme configuration belong?

Nuxt UI v4 is CSS-first and built on Tailwind CSS. Its theme is not one setting: CSS establishes the palette and global design tokens, AppConfig assigns meaning to colors and sets shared component styling, and component-level APIs handle exceptions. The official Nuxt UI overview documents these configuration surfaces.

Use the broadest scope that fits the decision. A brand color belongs in the shared palette; a semantic role such as primary belongs in AppConfig; a treatment for one subtree belongs in UTheme; and a one-off adjustment belongs on the component. This hierarchy reduces duplicated styling and makes later changes easier.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do you define the CSS entry point and palette?

In the stylesheet used by your application, import Tailwind and Nuxt UI, then declare your custom palette with Tailwind’s @theme syntax. The overview shows this pattern:

@import "tailwindcss";
@import "@nuxt/ui";

@theme static {
  --color-brand-50: ...;
  --color-brand-100: ...;
  --color-brand-500: ...;
  --color-brand-900: ...;
}

Replace the ellipses with actual color values and define the scale you need. Keep token names consistent wherever they are referenced; for example, if AppConfig maps a semantic role to brand, the palette must provide that color scale. A complete, evenly spaced scale is not required by the example, but missing shades can limit which shade-based styles are available.

Global CSS variables can also express shared values such as radius and content width. The overview illustrates --ui-radius and --ui-container. Verify token names against the installed Nuxt UI release before relying on a longer or exhaustive list: theme details can change between releases.

If your application has color-mode support and applies a .dark class, you can override relevant variables under that selector. A dark-mode override only takes effect when the app’s color-mode setup actually applies the selector; CSS alone does not enable color-mode behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do you change the primary color in Nuxt UI?

Map semantic color roles to your palette in app.config.ts. This lets a component ask for primary without knowing which brand palette supplies it. The official overview demonstrates a configuration shaped like this:

export default defineAppConfig({
  ui: {
    colors: {
      primary: 'brand',
      secondary: 'violet',
      success: 'green',
      info: 'blue',
      warning: 'amber',
      error: 'red',
      neutral: 'slate'
    }
  }
})

Use palette names that exist in your CSS theme. To change the app’s primary appearance later, update the mapping or palette rather than editing every component that uses the primary role. The same approach keeps statuses such as success, warning, and error purposeful and consistent.

How do you override component styles globally?

For styling that should be shared across the app, configure component themes in app.config.ts. Nuxt UI component themes support slots, variants, compound variants, and default variants. Slots target parts of a component; variants define alternate treatments; compound variants apply when multiple variant conditions coincide; and defaults set the behavior when a component does not receive an explicit choice.

The overview’s Button example shows how a base slot and a size-specific slot can be combined with a default color variant. Adapt the relevant component theme rather than copying a generic class override into every template. Theme keys and available slots are component-specific, so check the documentation or types for the component and installed release you are using.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do you scope a theme to part of the app?

Wrap a subtree in <UTheme> when a section needs different component styling or defaults without changing the app-wide theme:

<UTheme :ui="sectionTheme" :defaults="sectionDefaults">
  <YourSection />
</UTheme>

Pass the configuration objects appropriate to your use case; the snippet is a structural example, not a complete theme definition. UTheme was introduced in v4.5.0 for descendant component theme overrides, and v4.8.0 added descendant prop defaults. The v4.5.0 release notes state that UTheme renders no HTML element and uses Vue provide/inject. Nested themes are supported, with the innermost theme winning; a component’s own ui prop takes priority over the scoped theme. The v4.8.0 notes document defaults such as Button color, variant, and size or Input size; an explicit component prop remains authoritative.

When should you use a component’s ui or class prop?

Use a component’s ui prop for a local, slot-specific exception and class for additions to its root element. These are appropriate when the difference is genuinely local; if the same treatment recurs across the app, move it into shared component configuration or a scoped UTheme instead.

The practical distinction is scope and maintenance: CSS tokens define reusable raw values, AppConfig establishes app-wide semantics and defaults, UTheme narrows those decisions to descendants, and component props make individual exceptions. Shared tokens and themes are easier to change consistently than repeated local class strings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does unstyled mode remove?

Set ui.theme.unstyled: true in Nuxt configuration only when you intend to supply a replacement styling system. The option strips default theme classes at build time. Nuxt UI’s v4.9.0 release notes warn that this includes structural classes—not just colors and decoration—such as positioning, transitions, flex, and grid behavior. Components with substantial layout needs, including Modal, Drawer, and Calendar, may therefore need those styles recreated.

Unstyled mode is a larger commitment than changing tokens or component themes: it removes built-in styling broadly, so expect to provide both visual treatments and layout behavior.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Which customization surface should you choose?

Need Use Scope and behavior
Define colors, fonts, radius, or layout tokens Project CSS and Tailwind @theme Shared design values consumed by styles and configuration.
Assign purpose-based colors or shared component treatments app.config.ts Application-wide semantic colors and component defaults.
Change descendant styling or defaults in one area <UTheme> Subtree scope; nested theme and explicit component-prop precedence apply.
Make a one-component exception Component ui or class prop Local scope; convenient, but repeated overrides are harder to maintain.
Replace Nuxt UI’s built-in theme styling ui.theme.unstyled in Nuxt config Build-time setting that removes decorative and structural theme classes.

What should you check when upgrading or migrating?

Use the v4 release installed in your project as the authority for advanced theme details. Nuxt UI’s release index showed v4.11.3 dated October 1, 2026 as newer than v4.11.2, dated September 22, 2026. The v4.11.2 changelog includes fixes involving partial ui overrides on items and defaultVariants in FieldGroup themes, evidence that component theme behavior can evolve even within v4. Consult the v4.11.2 release page and the documentation or types matching your installed version before copying advanced configuration.

For projects moving from Nuxt UI v3 or Nuxt UI Pro, the v4.0.0 migration notes identify core changes: use the @nuxt/ui package and module, rename the app configuration key from uiPro to ui, update the CSS import from @nuxt/ui-pro to @nuxt/ui, and adjust imports as needed. Follow the migration guide for the full project-specific process rather than treating those core changes as the entire migration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.