n-config-provider

Centralize theme, locale, and component defaults for Naive UI apps.

8|3|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/jiaiyan/naive-ui-skills --skill n-config-provider
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n-config-provider
Source: https://github.com/jiaiyan/naive-ui-skills/tree/main/components/n-config-provider
Command: npx skills add https://github.com/jiaiyan/naive-ui-skills --skill n-config-provider

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Global configuration for Naive UI apps, enabling central control of theme, locale, and component defaults.

Core Features & Use Cases

  • Centralize theme management, locale, and component option defaults for consistent UI across the app.
  • Support inheritance and SSR-friendly configuration with namespace isolation and abstract mode when needed.
  • Use-case: A large Vue 3 app with multiple Naive UI components requiring unified look and behavior.

Quick Start

Wrap your entire app with n-config-provider to set global theme, locale, and component defaults.

Frequently Asked Questions about n-config-provider

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I centralize global theme and locale settings in a Naive UI Vue 3 application?

To centralize global theme and locale settings, wrap your entire Vue 3 application with the Naive UI config provider component. This establishes a root configuration layer that propagates unified UI appearance and behavior down to all nested components.

Can I configure component defaults and namespace isolation for Naive UI in a server-side rendered app?

Yes, you can configure component defaults and namespace isolation for SSR apps. The configuration provider supports server-side rendering considerations, allowing safe global theme and locale injection without hydration conflicts in Vue 3.

What is the best way to manage multiple themes across different sections of a Vue 3 Naive UI project?

The best way to manage multiple themes is nesting configuration providers within your component tree. Nested providers override the root global theme, enabling distinct localized styling and component defaults for specific application sections.

Does the Naive UI config provider support date locale and breakpoint customization?

Yes, the Naive UI config provider supports date locale and breakpoint customization. It accepts specific props for global configuration, allowing you to define responsive breakpoints and localized date formatting across your application.

Why are my nested Naive UI components not inheriting the global theme overrides?

Nested components fail to inherit global theme overrides when the configuration provider is improperly structured or missing. Ensure the parent wrapper correctly passes theme props down the component tree to enable seamless inheritance.

When should I disable inline themes using the config provider in Naive UI?

You should disable inline themes when you want to prevent inline CSS style injection. Using the inline theme disabled prop forces the configuration provider to manage styles globally, helping avoid CSS conflicts in complex DOM structures.