[]previous and next page

Title

Sets the document title.

Sets the document title. The last registered Title wins; removing it restores the one below, or the original title when none is left.

Import#

ts
import { Title } from "@shadow-js/web";

Signature#

ts
function Title(props: TitleProps): null

Parameters#

Name Description
props The title text.

Returns#

Always null: nothing is rendered in place.

Throws#

  • TypeError (production message SHADOW_HEAD_TITLE_TEXT) when the children are not text.

Examples#

ts
import { Title } from "@shadow-js/web";

function Home() {
  return <Title>Home | Blog</Title>;
}