useDuxtConfig()
The merged config, every text field already resolved.
The one to reach for in a replaced component.
Signature
const duxt = useDuxtConfig();
Returns
The whole config, reactive: the layer defaults with your app.config.ts merged
over them, and every text field already a string.
Notes
Two things happen here that a component should never have to know about. Nuxt own
app.config merge appends arrays instead of replacing them, so a consumer
overriding navigation would get the layer entries after its own; this merge
replaces them. And a label may be a literal, an i18n key or a per-locale record —
all three collapse to a string, so a template never meets a key.
The result stays live, so switching language updates the navbar without a full page load.
Was this page helpful?