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.8", features = ["font-awesome-brands"] }
The following features are available. Please see react-icons site to check the icon name and icon design.
- bootstrap
- font-awesome-brands
- font-awesome-regular
- font-awesome-solid
- feather
- octicons
- hero-icons-outline
- hero-icons-solid
- ionicons
- lucide
- material-design-icons-action
- material-design-icons-alert
- material-design-icons-av
- material-design-icons-communication
- material-design-icons-content
- material-design-icons-device
- material-design-icons-editor
- material-design-icons-file
- material-design-icons-hardware
- material-design-icons-home
- material-design-icons-image
- material-design-icons-maps
- material-design-icons-navigation
- material-design-icons-notification
- material-design-icons-places
- material-design-icons-social
- material-design-icons-toggle
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 run
cd packages/exmaple
cargo install dioxus-cli
dx serve
- checkout a new tag in the icon resource submodule
- create new icon files
- Update README.md and check the LICENSE