Title
Edit this pageTitle
is a component that renders the title
element.
This will render the title of the page in the browser tab.
import { const Title: Component<JSX.HTMLAttributes<HTMLTitleElement>>
Title } from "@solidjs/meta";<const Title: Component<JSX.HTMLAttributes<HTMLTitleElement>>
Title>My Site</const Title: Component<JSX.HTMLAttributes<HTMLTitleElement>>
Title>;
Usage
Setting the title for your site
import { const MetaProvider: ParentComponent
MetaProvider, const Title: Component<JSX.HTMLAttributes<HTMLTitleElement>>
Title } from "@solidjs/meta";export default function function Root(): JSX.Element
Root() { return ( <const MetaProvider: ParentComponent
MetaProvider> <const Title: Component<JSX.HTMLAttributes<HTMLTitleElement>>
Title>Default Application Title</const Title: Component<JSX.HTMLAttributes<HTMLTitleElement>>
Title> </const MetaProvider: ParentComponent
MetaProvider> );}