Function leptos_meta::Html
source · pub fn Html(props: HtmlProps) -> impl IntoView
Expand description
A component to set metadata on the document’s <html>
element from
within the application.
use leptos::*;
use leptos_meta::*;
#[component]
fn MyApp() -> impl IntoView {
provide_meta_context();
view! {
<main>
<Html
lang="he"
dir="rtl"
// arbitrary additional attributes can be passed via `attr:`
attr:data-theme="dark"
/>
</main>
}
}
§Required Props
- attributes: [
Vec<(&'static str, Attribute)>
]- Arbitrary attributes to add to the
<html>
- Arbitrary attributes to add to the
§Optional Props
- lang:
impl Into<TextProp>
- The
lang
attribute on the<html>
.
- The
- dir:
impl Into<TextProp>
- The
dir
attribute on the<html>
.
- The
- class:
impl Into<TextProp>
- The
class
attribute on the<html>
.
- The