pub fn Style(props: StyleProps) -> impl IntoView
Expand description
Injects an HTMLStyleElement
into the document
head, accepting any of the valid attributes for that tag.
use leptos::prelude::*;
use leptos_meta::*;
#[component]
fn MyApp() -> impl IntoView {
provide_meta_context();
view! {
<main>
<Style>
"body { font-weight: bold; }"
</Style>
</main>
}
}
§Optional Props
- id: [
impl Into<Oco<'static, str>>
](Oco<’static, str>)- An ID for the
<script>
tag.
- An ID for the
- media: [
impl Into<Oco<'static, str>>
](Oco<’static, str>)- The
media
attribute.
- The
- nonce: [
impl Into<Oco<'static, str>>
](Oco<’static, str>)- The
nonce
attribute.
- The
- title: [
impl Into<Oco<'static, str>>
](Oco<’static, str>)- The
title
attribute.
- The
- blocking: [
impl Into<Oco<'static, str>>
](Oco<’static, str>)- The
blocking
attribute.
- The
- children:
Children
- The content of the
<style>
tag.
- The content of the