Skip to content

Runtime component customization with updateAppConfig #2828

@izoukhai

Description

@izoukhai

For what version of Nuxt UI are you asking this question?

v3.0.0-alpha.x

Description

I want to customize my app.config.ts file from an external source.

Consider the following:

// plugins/config.ts

export default defineNuxtPlugin({
  async setup(nuxtapp) {
    const config = await fetchConfig()
    // output: {ui: {primary: "violet", button: {slots: {base: "hidden"}}}}

    if (config?.app_config) {
      updateAppConfig(config.app_config);
    }
  },
});

The primary color is updated correctly, but the hidden class is not applied to buttons.
Any ideas why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions