Expand description
§𧬠Dioxus Material Icons
This project provides a simple but configurable component to render Googleβs Material Icons in Dioxus.
Β§π How to get started
cargo add dioxus-material-icons
This project introduces two components:
To be able to use the MaterialIcon
component anywhere in your code, you first have to include
a MaterialIconStylesheet
component. When you want to use the default settings,
just add it to your appβs root component like this:
MaterialIconStylesheet { }
Have a look at the MaterialIconStylesheet
docs for more options like self-hosting the icon font file.
After that you can use the MaterialIcon
component like you would expect it:
MaterialIcon { name: "settings" }
You can additionally specify the color and size.
MaterialIcon {
name: "settings",
size: 24,
color: MaterialIconColor::Light,
}
Β§π‘ Examples
Β§π Useful links
- Overview of all icons (including names)
Β§Alternatives
- dioxus-free-icons (Support for other icon packs)
Β§π License
This software is licensed under the terms of the MIT License.
Note: All Material Icons are licensed under the Apache License 2.0.
Β© 2023 Lennart Kloock
StructsΒ§
- Material
Icon Props - Props for the
MaterialIcon
component - Material
Icon Stylesheet Props - Props for the
MaterialIconStylesheet
component
EnumsΒ§
- Material
Icon Color - Colors of Material Icons
- Material
Icon Variant - Variants (also called categories) of the Material Icon font
FunctionsΒ§
- Icon
Color - Create a new
MaterialIconColor::Custom
variant - Material
Icon - Material Icon component
- Material
Icon Stylesheet - Stylesheet component