Nuxe re-exportsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/dvlkit/nuxe/llms.txt
Use this file to discover all available pages before exploring further.
useHead, useHeadSafe, and useSeoMeta directly from @unhead/vue. Tags declared with any of these composables are injected into the HTML <head> during server-side rendering and updated reactively on every client-side navigation — no lifecycle hacks, document.title assignments, or cleanup code required.
useHead, useHeadSafe, and useSeoMeta are auto-imported in every page and component. You do not need to add an explicit import statement unless you prefer to be explicit.useHead(input)
Use useHead to set the page title, meta tags, link tags, scripts, or any other element that belongs in <head>. The real about.vue page in the Nuxe playground demonstrates the pattern:
@unhead/vue UseHeadInput type:
| Key | Type | Description |
|---|---|---|
title | string | () => string | Document title |
meta | MetaTag[] | <meta> elements |
link | LinkTag[] | <link> elements (stylesheets, canonical, etc.) |
script | ScriptTag[] | <script> elements |
style | StyleTag[] | Inline <style> elements |
htmlAttrs | object | Attributes added to <html> |
bodyAttrs | object | Attributes added to <body> |
useHeadSafe(input)
useHeadSafe has the same signature as useHead but sanitises every string value before inserting it into the DOM. Use it whenever any part of the head input originates from user-provided data to prevent XSS:
useSeoMeta(input)
useSeoMeta is a typed, SEO-focused shorthand. Instead of spelling out individual <meta> elements you describe your intent with named keys and the composable generates the correct tags — including Open Graph and Twitter Card variants:
useSeoMeta prevents common mistakes such as accidentally setting og:description via a raw <meta property="…"> with the wrong attribute name.
Reactive titles
Pass a function (or a computed ref) instead of a static string to make any head value update automatically when reactive data changes:Combining composables
You can calluseHead and useSeoMeta together in the same component — their outputs are merged:
SSR behaviour
During server-side rendering, Nuxe serialises all head tags collected byuseHead / useSeoMeta and writes them directly into the <head> of the initial HTML response. On the client, @unhead/vue hydrates from that rendered state and takes over reactivity — there is no double-rendering or flash of missing meta tags.
The app/error.vue page uses exactly the same pattern to set a dynamic title that reflects the current error: