Function Stylesheet

Source
pub fn Stylesheet(props: LinkProps) -> Element
Expand description

Render a link tag into the head of the page with the stylesheet rel. This is equivalent to the Link component with a slightly more ergonomic API.

ยงExample

fn RedBackground() -> Element {
    rsx! {
        document::Stylesheet {
            href: asset!("/assets/style.css")
        }
    }
}

Any updates to the props after the first render will not be reflected in the head.