Function leptos_meta::Link
source · pub fn Link(cx: Scope, props: LinkProps) -> impl IntoView
Expand description
Injects an HTMLLinkElement into the document head, accepting any of the valid attributes for that tag.
use leptos::*;
use leptos_meta::*;
#[component]
fn MyApp(cx: Scope) -> impl IntoView {
provide_meta_context(cx);
view! { cx,
<main>
<Link rel="preload"
href="myFont.woff2"
as_="font"
type_="font/woff2"
crossorigin="anonymous"
/>
</main>
}
}
Required Props
- cx: [
Scope
]
Optional Props
- id:
impl
Into<String>
- The
id
attribute.
- The
- as_:
impl
Into<String>
- The
as
attribute.
- The
- crossorigin:
impl
Into<String>
- The
crossorigin
attribute.
- The
- disabled:
impl
Into<bool>
- The
disabled
attribute.
- The
- fetchpriority:
impl
Into<String>
- The
fetchpriority
attribute.
- The
- href:
impl
Into<String>
- The
href
attribute.
- The
- hreflang:
impl
Into<String>
- The
hreflang
attribute.
- The
- imagesizes:
impl
Into<String>
- The
imagesizes
attribute.
- The
- imagesrcset:
impl
Into<String>
- The
imagesrcset
attribute.
- The
- integrity:
impl
Into<String>
- The
integrity
attribute.
- The
- media:
impl
Into<String>
- The
media
attribute.
- The
- prefetch:
impl
Into<String>
- The
prefetch
attribute.
- The
- referrerpolicy:
impl
Into<String>
- The
referrerpolicy
attribute.
- The
- rel:
impl
Into<String>
- The
rel
attribute.
- The
- sizes:
impl
Into<String>
- The
sizes
attribute.
- The
- title:
impl
Into<String>
- The
title
attribute.
- The
- type_:
impl
Into<String>
- The
type
attribute.
- The
- blocking:
impl
Into<String>
- The
blocking
attribute.
- The