使用 dioxus-free-icons 可在您的 Dioxus 项目中轻松地使用免费的 svg 图标。
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.
To use dioxus-free-icons, add this to your Cargo.toml:
[dependencies]
dioxus-free-icons = { version = "0.9", features = ["font-awesome-brands"] }The following features are available. Please see react-icons site to check the icon name and icon design.
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() -> Element {
rsx!(
Icon {
width: 30,
height: 30,
fill: "black",
icon: FaRust,
}
)
}This project is licensed under the MIT license.
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.
// generate icon files
cd packages/codegen
cargo runcd packages/exmaple
cargo install dioxus-cli
dx serve暂无开放 Issues,或尚未同步最近议题。