NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #5914 most downloaded on npm
Full-stack <head> manager built for any framework.
Latest stable
3.5.4
Last release today
28 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
343 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
HashHydrationPlugin: avoid setting empty hash
Nothing published for this version
There were a number of more verbose composable which were deprecated in v1, they have now been removed. (https://github.com/unjs/unhead/pull/184).
The slowest part of Unhead is figuring out what DOM elements and attributes are needed to be added, updated or removed.
This release introduces an improved DOM renderer with some key improvements:
You should see a ~20% reduction in your client bundle without losing any functionality.
Before
After
A flag was previously introduced that enabled experimental hash hydration experimentalHashHydration. This reduces your initial mount time to 0ms for the dom renderer. This has now been moved to a plugin.
This is now an optional plugin and should perform better.
createHead({
- experimentalHashHydration: true,
+ plugins: [
+ HashHydrationPlugin()
+ ]
})
dom:rendered get tags once they're renderedThere were a number of more verbose composable which were deprecated in v1, they have now been removed. (https://github.com/unjs/unhead/pull/184).
If you're using any of the following, you should use the useHead or other composable.
useTagTitleuseTagBaseuseTagMetauseTagMetaFlatuseTagLinkuseTagScriptuseTagStyleuseTagNoscriptuseHtmlAttrsuseBodyAttrsuseTitleTemplateuseServerTagTitleuseServerTagBaseuseServerTagMetauseServerTagMetaFlatuseServerTagLinkuseServerTagScriptuseServerTagStyleuseServerTagNoscriptuseServerHtmlAttrsuseServerBodyAttrsuseServerTitleTemplateYour coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Nothing published for this version
### Bug Fixes * dom: add hook dom:rendered
dom:rendered (553c200)unhead: only sort head tags with capo
Nothing published for this version
### Bug Fixes * allow async transformers
allow hooking into before tag resolve tags:beforeResolve
tags:beforeResolve (1f22aec)unhead: broken titles with $1 in them
### Bug Fixes * schema: type new entry options
unhead: auto mode: server when using createServerHead
addons: avoid duplicate twitter:card with InferSeoMetaPlugin
unhead: string themeColor regression
themeColor regression (e7ccce9)For parity with how the tag priority works for other tags, you can now set a tag priority for title and title template.
For parity with how the tag priority works for other tags, you can now set a tag priority for title and title template.
useHead({
title: {
textContent: 'high-priority title',
tagPriority: 'high',
},
})
// ...
useHead({
title: 'new title'
})
// ...
// title will be "high-priortiy title"
themeColor (75fd20d)You can now provide themeColor as an object or an array of objects with the media key. This allows you to provide different themes depending on the device and user preferences.
useSeoMeta({
themeColor: [
{ content: 'cyan', media: '(prefers-color-scheme: light)' },
{ content: 'black', media: '(prefers-color-scheme: dark)' },
],
})
### Bug Fixes * unhead: support Safari <= 13.0
patch tags using key without destroying them (6e1b43d), closes #145
Nothing published for this version
unhead: only replace URI decoded params (5f5290a), closes #127
vue: types for nested templateParams
templateParams: substitute json values safely
inferSeoMetaPlugin: infer from titleTemplates
Nothing published for this version
### Bug Fixes * ssr: stringify inner content
useSeoMeta: use correct og tag for site name by @manniL
unhead: templateParams not getting filtered
addons: export unplugin options
Nothing published for this version
addons: provide unplugin options
unhead: inline dependency packrup
packrup (4367ee6)unhead: support createServerHead
addons: support stubbing useSeoMeta({ title })
useSeoMeta({ title }) (a330beb)templateParams: edge-case regex issues
templateParams: always process params for %s usage
UseSeoMetaTransform: inline dep estree-walker, fixes #119
TreeshakeServerComposable: do not run on server builds
templateParams: %s and %pageTitle substitution
UseSeoMetaTransform: calleeName fallback
addons: avoid transpiling node_modules
### Bug Fixes * addons: missing root error
root error (79096a7)This worked well, but it was not clear what kind of behaviour this would have in the DOM and SSR. children is now deprecated in favour of using textCo…
1.1.0 is here and with it comes some exciting new features, significantly performance improvements a number of security improvements and more!
Allows you to add template parameters that can be referenced in other tags. This is useful for reducing boilerplate and for third-party integrations to provide runtime configuration.
useHead({
templateParams: {
seperator: '|',
site: {
name: 'My Site',
url: 'https://example.com',
}
},
titleTemplate: '%s %seperator %site.name',
meta: [
{
property: 'og:url',
content: '%site.url'
},
{
property: 'og:image',
content: '%site.url/image.png'
}
]
})
This release signifies a shift in how we deal with potential XSS issues. The
useHeadSafecomposable is now the recommended way to add head data when the input is not trusted. The white-listed tags and attributes are significantly limited, as there are many more XSS vectors than just script tags.
useHeadSafe({
title: 'About',
meta: [
{
name: 'description',
content: 'My about page'
}
]
})
The previous recommendation for tag inner content was to use the
childrenkey. This worked well, but it was not clear what kind of behaviour this would have in the DOM and SSR.childrenis now deprecated in favour of usingtextContentandinnerHTMLkeys.
useHead({
script: [
// more obvious that this is dangerous
{ innerHTML: "console.log('hello world')" }
]
})
While dealing with tags, which will just be inner content such as <style> and <script>, shorthand input is now available.
useHead({
// This will be converted to <style>body { background: red; }</style>
style: [ 'body { background: red; }' ],
// shorthand urls are also supported: <script src="https://example.com/script.js"></script>
script: [ 'https://example.com/script.js' ]
})
experimentalHashHydration (PR)The experimentalHashHydration option is being introduced, it is opt-in. It offers some sites the ability to completely bypass the blocking CPU time for the client hydration of head tags. (between 5-25ms reduction)
createHead({
experimentalHashHydration: true,
})
UseSeoMetaTransform (PR)The useSeoMeta function is a great addition for developer experience, but the code required to unpack the meta is around 2kb and in most cases is not needed at runtime. We add a custom Vite transformer which turns useSeoMeta into useHead.
import UnheadVite from '@unhead/addons/vite'
export default defineConfig({
plugins: [
UnheadVite(),
],
})
UseSeoMetaTransform https://github.com/unjs/unhead/pull/117avoid inlining unhead dependency
### Features * vue: support keepalive
Nothing published for this version
dom: support envs without isEqualNode
addons: require og:image for twitter:card infer
og:image for twitter:card infer (44ad220)compact with vitest-environment-nuxt
vue: export unheadVueComposablesImports properly (feebe38), closes #64
Nothing published for this version
InferSeoMetaPlugin: improved templating
Nothing published for this version
InferSeoMetaPlugin: avoid duplicate tags
### Bug Fixes * vue: ensure head exists
treeshake-plugin: tree shake useSchemaOrg
useSchemaOrg (8f166d9)unhead: head.use API for plugins
head.use API for plugins (f56ad31)unhead: normalise innerHTML objects to json
optionsAPI: ensure reactive data
vue: allow reactivity outside of components
dom: avoid setting empty classes
One column per quarter.