| Crates.io | iced_font_awesome |
| lib.rs | iced_font_awesome |
| version | 0.4.1 |
| created_at | 2024-09-04 19:05:44.330369+00 |
| updated_at | 2025-12-10 22:12:22.484895+00 |
| description | Font Awesome component for Iced |
| homepage | https://github.com/danielmbomfim/iced_font_awesome |
| repository | https://github.com/danielmbomfim/iced_font_awesome |
| max_upload_size | |
| id | 1363661 |
| size | 11,987,244 |
iced_font_awesome is a simple and efficient widget for displaying Font Awesome icons in your Iced applications. Customize the size and color of your icons effortlessly.
Add the following to your Cargo.toml:
[dependencies]
iced = "^0.14"
iced_font_awesome = "0.4.0"
Here's a basic example of how to use iced_font_awesome:
use iced::{color, widget::row, Task};
use iced_font_awesome::{fa_icon, fa_icon_brands, fa_icon_solid};
fn main() -> iced::Result {
iced::application(Demo::new, Demo::update, Demo::view).run()
}
struct Demo {}
impl Demo {
fn new() -> (Self, Task<()>) {
(Self {}, Task::none())
}
fn update(&mut self, _message: ()) {}
fn view(&self) -> iced::Element<'_, ()> {
row!(
fa_icon("circle-user").size(40.0).color(color!(0, 255, 0)),
fa_icon_solid("medal")
.size(50.0)
.color(color!(249, 170, 51)),
fa_icon_brands("google").size(60.0)
)
.align_y(iced::Alignment::Center)
.padding(10)
.spacing(10)
.into()
}
}
Result:
size method.color method.The Icons Explorer is a handy tool to browse and experiment with all available Font Awesome icons.
To run the Icons Explorer example, follow these steps:
git clone https://github.com/danielmbomfim/iced_font_awesome.git
cd iced_font_awesome
cargo run --example explorer
This will start the Explorer, allowing you to browse through the icons.
This library defaults to Font Awesome 7. To use Font Awesome 6, enable the v6 feature and import the icons as follows:
use iced_font_awesome::v6::{fa_icon, fa_icon_brands, fa_icon_solid};
| Iced Version | Required Iced Font Awesome Version |
|---|---|
| 0.12 | 0.1.0 |
| 0.13 | 0.2.0 |
| 0.14 | 0.4.0 |