Meta reference

Link

Edit this page

Link adds a <link> element that defines a relationship between the document and an external resource.


Import

import { Link } from "@solidjs/meta";

Type

const Link: Component<JSX.LinkHTMLAttributes<HTMLLinkElement>>;

Props

Accepts attributes for <link>.


Behavior

  • Registers a self-closing link tag.
  • Non-cascading tags can add one document-head element per active instance.
  • Requires MetaProvider in the component tree.

Examples

Basic usage

import { MetaProvider, Link } from "@solidjs/meta";
function App() {
return (
<MetaProvider>
<Link rel="icon" href="/favicon.ico" />
</MetaProvider>
);
}

Report an issue with this page