leptos_meta

Function Stylesheet

source
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

§Optional Props