Title
Edit this pageTitle adds a <title> element that sets the document title.
Import
import { Title } from "@solidjs/meta";Type
const Title: Component<JSX.HTMLAttributes<HTMLTitleElement>>;Props
Accepts attributes for <title>.
children
- Type:
JSX.Element - Optional: Yes
Content rendered inside the title element.
Behavior
- Registers a
titletag withclose: trueandescape: true. - Cascading keeps the latest active
titleinstance in the document head and restores the previous instance when the latest one is removed. - Requires
MetaProviderin the component tree.
Examples
Basic usage
import { MetaProvider, Title } from "@solidjs/meta";
export default function Root() { return ( <MetaProvider> <Title>Solid Docs</Title> </MetaProvider> );}