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