Crate leptos_icons

Crate leptos_icons 

Source
Expand description

githubcrates-iodocs-rs


A simple component that reactively renders an icon.

To render icons, this crate needs to be coupled with icondata, which is an icon source providing over 20,000 icons.

§Getting Started

In your Cargo.toml, include both leptos_icons and icondata:

[dependencies]
leptos_icons = { version = "{crate_version}" }
icondata = { version = "{icondata_version}" }

In your leptos project, use:

use leptos::prelude::*;
use leptos_icons::Icon;

let _ = view! {
    <Icon icon=icondata::BsFolder />
};

Complete examples are available on github.

Structs§

IconProps
Props for the Icon component.
SymbolProps
Props for the Symbol component.

Functions§

Icon
The Icon component.
Symbol
Creates a <symbol> with the icon.