Crates.io | dioxus-material-icons |
lib.rs | dioxus-material-icons |
version | 2.0.0 |
source | src |
created_at | 2023-01-21 13:39:46.318366 |
updated_at | 2024-07-29 18:23:34.816043 |
description | Material Icons for Dioxus |
homepage | https://lennart.codes/dioxus-material-icons |
repository | https://github.com/lennartkloock/dioxus-material-icons |
max_upload_size | |
id | 764333 |
size | 257,252 |
This project provides a simple but configurable component to render Google's Material Icons in Dioxus.
cargo add dioxus-material-icons
This project introduces two components:
MaterialIconStylesheet
MaterialIcon
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 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,
}
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