Components
Composables
useHead
Add reactive tags to the document head with Unhead.
useHead({
title: "Projects",
meta: [
{ name: "description", content: "Project list" },
],
link: [
{ rel: "canonical", href: "https://example.com/projects" },
],
});Values can be reactive:
const project = ref<Project | null>(null);
useHead(() => ({
title: project.value?.name ?? "Loading…",
}));Unhead collects entries during SSR, then updates them on the client when their dependencies change.