dioxus-free-icons
Use free svg icons in your Dioxus projects easily with dioxus-free-icons.
More information about this crate can be found in the crate documentation.
Install
To use dioxus-free-icons
, add this to your Cargo.toml:
[dependencies]
dioxus-free-icons = "0.1.1"
Example
This library provides Icon component, which will generate SVG for a Font Awesome icon.
use dioxus::prelude::*;
use dioxus_free_icons::icons::fa_brands_icons::FaRust;
use dioxus_free_icons::Icon;
fn RustIcon(cx: Scope) -> Element {
cx.render(rsx! {
Icon {
size: 30,
fill: "black",
icon: Icon::FaRust,
}
})
}
License
This project is licensed under the MIT license.
Icon
Icon Library | License | Version |
---|---|---|
Font Awesome | CC BY 4.0 License | 6.1.1 |
heroicons | MIT License | 1.0.6 |
ionicons | MIT License | 6.0.2 |
Contribution
The project welcomes all contributions from anyone willing to work in good faith with other contributors and the community. In particular, contributions regarding support for other free icons such as Material Design icons or Ionicons are welcome. This library aims to be a react-icons-like library for dioxus projects.
Development
// generate icon files
cd packages/codegen
cargo run
Preview
cd packages/exmaple
cargo install dioxus-cli
dioxus serve
Update icons
- checkout a new tag in the icon resource submodule
- create new icon files
- Update README.md and check the LICENSE