leptos_meta

Function Meta

source
pub fn Meta(props: MetaProps) -> impl IntoView
Expand description

Injects an HTMLMetaElement into the document head to set metadata

use leptos::prelude::*;
use leptos_meta::*;

#[component]
fn MyApp() -> impl IntoView {
  provide_meta_context();

  view! {
    <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>
  }
}

§Optional Props