#icons #leptos #web-framework #component

leptos_icons

Component library providing a variety of icons for the leptos web framework

20 unstable releases (3 breaking)

0.3.0 Jan 29, 2024
0.1.0 Oct 4, 2023
0.0.16-alpha Jul 28, 2023
0.0.1 Feb 7, 2023

#1069 in Web programming

Download history 271/week @ 2024-01-09 374/week @ 2024-01-16 359/week @ 2024-01-23 373/week @ 2024-01-30 531/week @ 2024-02-06 479/week @ 2024-02-13 281/week @ 2024-02-20 461/week @ 2024-02-27 205/week @ 2024-03-05 239/week @ 2024-03-12 253/week @ 2024-03-19 311/week @ 2024-03-26 331/week @ 2024-04-02 315/week @ 2024-04-09 323/week @ 2024-04-16 176/week @ 2024-04-23

1,184 downloads per month
Used in 2 crates

MIT license

8KB
70 lines

Leptos-Icons

Docs.rs GitHub

Add icons from popular icon libraries into your leptos projects.

Currently, you can use this example as a guide, but better examples and docs are coming. An index site is also available if you wish to filter through available icons.

Leptos compatibility

Crate version Compatible Leptos version
0.0.14 0.3
0.0.15 0.4
0.0.16-alpha 0.5.0-alpha
0.0.16-beta 0.5.0-beta2
0.0.16-rc3 0.5.0-rc3
0.1 0.5
0.2.1 0.5

MSRV

The minimum supported rust version is: 1.70.0


lib.rs:

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::*;
use leptos_icons::*;

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

Complete examples are available on github.

Dependencies

~20–33MB
~553K SLoC