pub fn Stylesheet(props: StylesheetProps) -> impl IntoView
Expand description
Injects an HTMLLinkElement
into the document
head that loads a stylesheet from the URL given by the href
property.
use leptos::prelude::*;
use leptos_meta::*;
#[component]
fn MyApp() -> impl IntoView {
provide_meta_context();
view! {
<main>
<Stylesheet href="/style.css"/>
</main>
}
}
§Required Props
- href:
impl Into<String>
- The URL at which the stylesheet is located.
§Optional Props
- id:
impl Into<String>
- An ID for the stylesheet.