119 releases (18 stable)
Uses new Rust 2024
| 1.16.0 | May 15, 2026 |
|---|---|
| 1.14.0 | Apr 30, 2026 |
| 0.576.0 | Apr 2, 2026 |
| 0.575.0 | Feb 20, 2026 |
| 0.534.0 | Jul 30, 2025 |
#81 in GUI
7,248 downloads per month
Used in 17 crates
(10 directly)
1MB
14K
SLoC
lucide-icons
Auto-generated rust icon definitions for lucide icons version 1.16.0
The library provides an Icon enum which contains all lucide icon variants:
use lucide_icons::Icon;
fn main() {
let icon = Icon::Anvil;
assert_eq!(format!("{icon}"), String::from("anvil"));
println!("unicode = {}", char::from(icon));
}
Iced
With the iced feature, the library also provides the icons as iced widgets:
use lucide_icons::LUCIDE_FONT_BYTES;
use lucide_icons::iced::icon_anvil;
fn setup_application() {
let settings = iced::Settings {
// add bundled font to iced
fonts: vec![LUCIDE_FONT_BYTES.into()],
..Default::default()
};
// run app with settings...
}
fn view() -> iced::Element<'_, Message, Theme, iced::Renderer> {
iced::widget::column![
// named widget function per icon
icon_anvil(),
// widget function per variant
Icon::Anvil.into()
].into()
}
Serde
With the serde feature, the library also provides serialization/deserialization for the Icon enum by an icon name.
use lucide_icons::Icon;
#[derive(serde::Serialize)]
struct IconWrapper {
icon: Icon
}
fn to_json() {
let icon = IconWrapper { icon: Icon::ArrowUpNarrowWide };
let str = serde_json::to_string(&icon).expect("should serialize");
assert_eq!(str, "{\"icon\":\"arrow-up-narrow-wide\"}");
}
For more details have a look at the generator repository page
Dependencies
~0–23MB
~314K SLoC