Crates.io | dioxus-material-symbols |
lib.rs | dioxus-material-symbols |
version | 0.4.3 |
source | src |
created_at | 2024-03-09 11:17:46.767633 |
updated_at | 2024-03-09 11:17:46.767633 |
description | Material Symbols for Dioxus |
homepage | https://github.com/kualta/diom |
repository | https://github.com/kualta/diom |
max_upload_size | |
id | 1167727 |
size | 451,621 |
This project provides a simple but configurable component to render Google's Material Symbols in Dioxus.
It's a fork of dioxus-material-icons
, the differences between this and cousin packages:
Material symbols also supports four adjustable variable font styles (fill, weight, grade, and optical size), but they are not implemented yet.
More information and overview of all icons: Google Material Symbols
[!NOTE] Latest supported Dioxus version is 4.3.0
cargo add dioxus-material-symbols
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.
© 2024 Lennart Kloock, kualta