Get Started
Overview
On this page
Use useHead() for general head management, useSeoMeta() for SEO tags, and useScript() for script loading. The head composables return an entry with patch() and dispose(); useScript() returns a script controller.
Composables
Plugins
See the Plugins API for creating custom plugins with defineHeadPlugin.
Hooks
Entry Hooks
- entries:updated: Called after client entries change
- entries:resolve: Called before the entry snapshot is resolved to tags
- entries:normalize: Called after one entry has been normalized to tags
Tag resolution
- tag:normalise: Reserved legacy hook; currently not emitted
- tags:beforeResolve: First hook over the resolved, deduplicated tag set
- tags:resolve: Called after
tags:beforeResolve - tags:afterResolve: Final tag-resolution hook before rendering
DOM rendering
- dom:beforeRender: Called before resolving and rendering to the DOM (synchronous)
Server rendering
- ssr:beforeRender: Called before server-side rendering
- ssr:render: Called after tags resolve but before serialization
- ssr:rendered: Called with the final SSR payload
- ssr:streamChunk: Called with tags that resolve after the streamed shell (synchronous)
Script loading
- script:updated: Internal hook emitted for script lifecycle status changes
Did this page help you?
On this page