[]previous and next page

Link

Registers a <link>.

Registers a <link>. Icons are keyed by rel, sizes and type; preloads and stylesheets by rel, href and as; other links are append-only.

Import#

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

Signature#

ts
function Link(props: HeadAttributeProps): null

Parameters#

Name Description
props Attributes, such as rel and 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, and for an invalid attribute name or an event attribute (see normalizeTags).

Examples#

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

function Page() {
  return <Link rel="stylesheet" href="/site.css" />;
}