Index of every page on this site: llms.txt
Svelte
Get Started

Overview

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

useHead()
The main composable for managing head tags.
useHeadSafe()
Restrictive filtering for untrusted head input.
useSeoMeta()
A composable for managing SEO-related tags.
useScript()
A composable for loading and managing external scripts.

Lazy Head

Lazy Head queues client entries while the server tags stay in place. The app or framework calls load() to apply them.

Plugins

See the Plugins API for creating custom plugins with defineHeadPlugin.

Hooks

Entry Hooks

Tag resolution

DOM rendering

  • dom:beforeRender: Called before resolving and rendering to the DOM (synchronous)

Server rendering

Script loading

  • script:updated: Internal hook emitted for script lifecycle status changes
Did this page help you?