| Crates.io | dioxus-feather-icons |
| lib.rs | dioxus-feather-icons |
| version | 0.2.3 |
| created_at | 2025-05-10 17:59:02.016285+00 |
| updated_at | 2025-05-11 15:40:18.154243+00 |
| description | Feather Icons for Dioxus |
| homepage | |
| repository | https://github.com/dsplce-co/dioxus-feather-icons |
| max_upload_size | |
| id | 1668656 |
| size | 122,126 |
Feather Icons for Dioxus β Inline SVG icons packaged for seamless use in Dioxus apps. This crate provides ergonomic macros to embed Feather Icons in your UI with no runtime cost.
rsx!Add to your Cargo.toml:
[dependencies]
dioxus-feather-icons = "0.2.3"
This crate requires Rust 2024 edition.
βΈ»
The crate includes a curated set of Feather .svg files and a bundled _sprite.svg. You do not need to download or manage the icons yourself.
βΈ»
To make icons render, you must inject the sprite once in your component tree, ideally toward the end of the body to avoid blocking first paint:
rsx! {
// ...
{ dioxus_feather_icons::sprite!() }
}
Avoid injecting it into <head> β inline SVGs are render-blocking when placed early.
βΈ»
Use the icon! macro to render a Feather icon inline. It supports progressively more customization:
β Basic usage (inherits text color, 24px size by default):
use dioxus::prelude::*;
use dioxus_feather_icons::prelude::*;
fn App() -> Element {
rsx! {
{ icon!(activity) }
}
}
π¨ Set a specific size:
icon!(alert_circle, 48)
π Customize size and color:
icon!(camera, 32, "#333")
let svg: &str = icon_str!(zap);
βΈ»
π¦ Crate: https://crates.io/crates/dioxus-feather-icons
π οΈ Repo: https://github.com/dsplce-co/dioxus-feather-icons
βΈ»
MIT or Apache-2.0, at your option.
βΈ»