Link
Edit this pageLink 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
linktag. - Non-cascading tags can add one document-head element per active instance.
- Requires
MetaProviderin the component tree.
Examples
Basic usage
import { MetaProvider, Link } from "@solidjs/meta";
function App() { return ( <MetaProvider> <Link rel="icon" href="/favicon.ico" /> </MetaProvider> );}