Expand description
This crate provides a collection of icons in the form of SVG data. It re-exports all icon libraries from the icondata_* crates.
The Icon
type alias refers to an IconData
struct, which contains the SVG data
used by a component library.
Available icons can be searched and seleted here.
§Getting Started
- Add the latest version of this crate to your
Cargo.toml
:
[dependencies]
icondata = "..."
- Import and use the icons in your code:
let icon = icondata::BsBuildingDown;
let icon = icondata::AiAlertFilled;
Note: importing icondata::*
will import all icons, which can heavily slow down rust-analyzer.
This can be avoided by importing only the icons you need: use icondata::{..., ...};
, or by
using the qualified path as above.
If you only need one or a few icon packs, you can enable only the features you need:
[dependencies]
icondata = { version = "...", default-features = false, features = ["lu", "bi"] }
Type Aliases§
- An Icon from any of the icondata_* crates.