[]previous and next page

Base

Registers the document <base>.

Registers the document <base>. There is one; the last registration wins. Base is placed first in the head, as browsers expect.

Import#

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

Signature#

ts
function Base(props: HeadAttributeProps): null

Parameters#

Name Description
props Attributes, such as href.

Returns#

Always null: nothing is rendered in place.

Throws#

  • TypeError (production message SHADOW_HEAD_ATTRIBUTE_VALUE) for an attribute value that is not a string, number or boolean.

Examples#

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

function Shell() {
  return <Base href="/app/" />;
}