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 |
|
#1069 in Web programming
1,184 downloads per month
Used in 2 crates
8KB
70 lines
Leptos-Icons
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
:
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