Function leptos_meta::Meta
source · pub fn Meta(cx: Scope, props: MetaProps) -> impl IntoView
Expand description
Injects an HTMLMetaElement into the document head to set metadata
use leptos::*;
use leptos_meta::*;
#[component]
fn MyApp(cx: Scope) -> impl IntoView {
provide_meta_context(cx);
view! { cx,
<main>
<Meta charset="utf-8"/>
<Meta name="description" content="A Leptos fan site."/>
<Meta http_equiv="refresh" content="3;url=https://github.com/leptos-rs/leptos"/>
</main>
}
}
Required Props
- cx: [
Scope
]
Optional Props
- charset:
impl
Into<TextProp>
- The
charset
attribute.
- The
- name:
impl
Into<TextProp>
- The
name
attribute.
- The
- http_equiv:
impl
Into<TextProp>
- The
http-equiv
attribute.
- The
- content:
impl
Into<TextProp>
- The
content
attribute.
- The