Struct leptos_meta::HtmlProps
source · pub struct HtmlProps {
pub lang: Option<TextProp>,
pub dir: Option<TextProp>,
}
Expand description
Props for the Html
component.
A component to set metadata on the document’s <html>
element from
within the application.
use leptos::*;
use leptos_meta::*;
#[component]
fn MyApp(cx: Scope) -> impl IntoView {
provide_meta_context(cx);
view! { cx,
<main>
<Html lang="he" dir="rtl"/>
</main>
}
}
Required Props
- cx: [
Scope
]
Optional Props
- lang:
impl
Into<TextProp>
- The
lang
attribute on the<html>
.
- The
- dir:
impl
Into<TextProp>
- The
dir
attribute on the<html>
.
- The
Fields§
§lang: Option<TextProp>
The lang
attribute on the <html>
.
dir: Option<TextProp>
The dir
attribute on the <html>
.