Function Title

Source
pub fn Title(props: TitleProps) -> Element
Expand description

Render the title of the page. On web renderers, this will set the title in the head. On desktop, it will set the window title.

Unlike most head components, the Title can be modified after the first render. Only the latest update to the title will be reflected if multiple title components are rendered.

The children of the title component must be a single static or formatted string. If there are more children or the children contain components, conditionals, loops, or fragments, the title will not be updated.

ยงExample

fn App() -> Element {
    rsx! {
        // You can use the Title component to render a title tag into the head of the page or window
        document::Title { "My Page" }
    }
}