@solidjs/meta
@solidjs/meta provides components for the document <head>.
Each one registers a tag with the head registry in @solidjs/web, so a component deep in the tree can set the title or a meta tag without a provider.
On the server the tags render into the HTML head; in the browser they update the live document.
import { Title, Meta } from "@solidjs/meta";
function ProductPage(props: { name: string }) { return ( <> <Title>{props.name} · Storefront</Title> <Meta name="description" content={`Buy ${props.name} today.`} /> {/* ... */} </> );}Head and metadata shows the default-and-override pattern and what happens under server rendering.
Components
Titlesets the document title. The last-registeredTitlewins, and unmounting it restores the previous one.Metaadds a<meta>element; tags with the same identity (name,property, and similar attributes) replace each other.Linkadds a<link>element.Stylesheetadds a stylesheet link.Styleadds an inline<style>element.Scriptadds a<script>element.Basesets the document base URL.Headgroups several tags into one set that replaces together.
Each page documents the component's identity rule: which earlier tag a new one replaces, and which coexist.