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