GuideThemingexportsharingapp-configcssjsonnuxt-ui

How to Export and Share Nuxt UI Themes

Export your Nuxt UI v4 themes as app.config.ts, CSS variables, or JSON - and share them with your team or the community.

Once you've created a theme in the Nuxt UI Theme Builder, you need to get it into your project. The builder supports three export formats, each suited to different workflows.

Export Formats

The native Nuxt UI approach. Copy the generated config directly into your project:

export default defineAppConfig({
  ui: {
    colors: {
      primary: "indigo",
      secondary: "violet",
      success: "emerald",
      warning: "amber",
      error: "rose",
      neutral: "zinc",
    },
  },
});

Best for: Nuxt UI projects. This is the simplest and most maintainable approach.

How to use:

  1. Open the Export panel in the Theme Builder
  2. Select "App Config" format
  3. Copy the generated code
  4. Paste into your project's app.config.ts

2. CSS Variables

Exports all theme tokens as CSS custom properties:

:root {
  --ui-color-primary-500: oklch(0.585 0.233 277.117);
  --ui-color-primary-600: oklch(0.518 0.233 278.117);
  /* ... all shades for all roles */
  --ui-radius: 0.375rem;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

.dark {
  --ui-color-primary-500: oklch(0.705 0.213 265.117);
  /* ... dark mode overrides */
}

If your theme uses custom palettes, the CSS export also starts with a @theme static block that defines them (--color-brand-50 … --color-brand-950). Add it alongside the app.config.ts export, which refers to those palettes by name.

Best for: Projects that need fine-grained shade control, non-Nuxt UI projects using Tailwind v4, or when integrating with existing CSS architectures.

How to use:

  1. Select "CSS" export format
  2. Copy the output
  3. Add to your main CSS file or a dedicated theme.css

3. JSON

Machine-readable format for programmatic consumption:

{
  "colors": {
    "primary": "indigo",
    "secondary": "violet",
    "success": "emerald",
    "warning": "amber",
    "error": "rose",
    "neutral": "zinc"
  },
  "radius": "md",
  "fontFamily": "Inter"
}

Best for: Storing theme data, building theme APIs, sharing between tools, or version-controlling theme decisions.

Saving and Managing Themes

Save Presets

The Theme Builder lets you save multiple named presets locally:

  1. Click Save Theme (or press Ctrl+S)
  2. Enter a name for your preset
  3. The preset is stored in your browser's localStorage

Switch Between Presets

Saved presets appear in the preset selector. Click any preset to apply it instantly and preview across all components.

Import Themes

You can import a previously exported JSON theme:

  1. Open the Export panel
  2. Use the Import tab
  3. Paste or upload a JSON configuration
  4. The theme is validated and applied

Sharing Themes

Share with Your Team

  1. Export as JSON
  2. Commit the JSON file to your repo (e.g., theme.json)
  3. Team members import it into the Theme Builder to preview
  4. Final version is exported as app.config.ts for the project

Share with the Community

Consider sharing your themes:

  • Export as JSON and include in a GitHub Gist
  • Share the app.config values in community forums
  • Include a screenshot from the Theme Builder showing the result

Best Practices

PracticeReason
Export as app.config.ts for productionNative integration, simplest setup
Keep a JSON backupEasy to reimport and iterate
Version control your themeTrack design decisions over time
Test exports in a fresh projectEnsure nothing is missing
Export both light and dark modesComplete theme coverage

Configuration Compatibility

The Theme Builder generates output compatible with:

  • Nuxt UI v4 (primary target)
  • Tailwind CSS v4 (CSS variable format)
  • Any Vue/Nuxt project (JSON format for custom consumption)

Try It Now

Head to the Theme Builder to create, preview, and export your theme. The full workflow - from palette selection to production-ready export - takes just a few minutes.

Want a head start? Every theme in the theme gallery shows its export code, ready to copy.

Next Steps