#icons #lucide #iced #font

lucide-icons

Rust definitions for lucide-icons

21 breaking releases

Uses new Rust 2024

new 0.501.0 Apr 20, 2025
0.499.0 Apr 20, 2025

#369 in GUI

Download history 142/week @ 2025-04-14

142 downloads per month

MIT license

685KB
11K SLoC

lucide-icons

Auto-generated rust icon definitions for lucide icons version 0.501.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 = {}", icon.unicode());
}

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() {
    // get font bytes for the bundled font
    let bytes = lucide_font_bytes();

    // add the font to iced
    let settings = iced::Settings {
        fonts: vec![bytes.into()],
        ..Default::default()
    };

    // run app with settings...
}

fn view() -> iced::Element<'_, Message, Theme, iced::Renderer> {
    iced::widget::column![
        icon_anvil()
    ].into()
}

For more details have a look at the generator repository page

Dependencies

~0–19MB
~296K SLoC