Nuxe re-exports three composables fromDocumentation 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.
@unhead/vue to manage the document <head> declaratively inside setup(). All three are auto-imported in Nuxe projects — no explicit import is needed. They are reactive: passing a computed or ref value updates the head element automatically when the value changes, including across client-side navigations.
All three composables are powered by
@unhead/vue under the hood and are auto-imported throughout your Nuxe application. You do not need to import them manually.useHead
Sets arbitrary <head> entries for the current route. Accepts an object whose keys map to standard HTML head elements.
Signature
Common fields
| Field | Type | Description |
|---|---|---|
title | string | ComputedRef<string> | Sets <title>. |
meta | Array<{ name?: string; property?: string; content: string }> | Adds <meta> tags. |
link | Array<{ rel: string; href: string; [key: string]: string }> | Adds <link> tags (e.g. canonical, stylesheet). |
script | Array<{ src?: string; innerHTML?: string; [key: string]: string }> | Adds <script> tags. |
htmlAttrs | Record<string, string> | Attributes placed on the <html> element. |
bodyAttrs | Record<string, string> | Attributes placed on the <body> element. |
Example
Reactive title
useHeadSafe
A sanitized variant of useHead that strips potentially dangerous HTML to prevent cross-site scripting (XSS) attacks. Use this whenever any part of the head input is derived from user-supplied or third-party content.
Signature
useHead. Internally @unhead/vue escapes values before injecting them into the DOM or SSR HTML.
Example
useSeoMeta
A fully-typed helper for the most common SEO and Open Graph meta tags. Instead of crafting raw <meta> objects, you pass a flat object with named fields — @unhead/vue maps them to the correct name / property attributes automatically.
Signature
Common fields
| Field | Type | Description |
|---|---|---|
title | string | Sets <title> and og:title. |
description | string | Sets <meta name="description">. |
ogTitle | string | Sets <meta property="og:title">. |
ogDescription | string | Sets <meta property="og:description">. |
ogImage | string | Sets <meta property="og:image">. |
ogUrl | string | Sets <meta property="og:url">. |
ogType | string | Sets <meta property="og:type"> (e.g. 'website', 'article'). |
twitterCard | 'summary' | 'summary_large_image' | 'app' | 'player' | Sets <meta name="twitter:card">. |
twitterTitle | string | Sets <meta name="twitter:title">. |
twitterDescription | string | Sets <meta name="twitter:description">. |
twitterImage | string | Sets <meta name="twitter:image">. |