Icon#

Icons are supported through the https://crates.io/crates/icondata crate. The crates readme show the available icon packages and their current versions.

Browse through available icons at https://carlosted.github.io/icondata/!

Leptonic provides a re-export of the icondata crate when using the prelude module.

You can simply include an icon using the <Icon> component.

use leptonic::prelude::*; view! { <Icon icon=icondata::BsFolderFill style="font-size: 6em;"/> <Icon icon=icondata::BsFolder style="font-size: 6em;"/> }

SVG data of all the icons used in your application is embedded into your binary.

Styling#

There are currently no CSS variables exposed, targeting the <Icon> component.

Notes:

  • Scale icons by setting the css font-size attribute.
  • Color icons by setting the css color attribute.
  • Some icons may also render different when altering the css background-color attribute.