Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lennartkloock/dioxus-material-icons
🧬 Material Icons for Dioxus
https://github.com/lennartkloock/dioxus-material-icons
Last synced: about 1 month ago
JSON representation
🧬 Material Icons for Dioxus
- Host: GitHub
- URL: https://github.com/lennartkloock/dioxus-material-icons
- Owner: lennartkloock
- License: mit
- Created: 2023-01-20T14:45:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-15T21:46:25.000Z (2 months ago)
- Last Synced: 2024-10-17T10:22:40.756Z (2 months ago)
- Language: Rust
- Homepage:
- Size: 360 KB
- Stars: 25
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🧬 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:
1. `MaterialIconStylesheet`
2. `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,
}
```## 💡 Examples
- [Button Example](https://github.com/lennartkloock/dioxus-material-icons/blob/main/examples/button.rs)
## 🔗 Useful links
- [Overview of all icons](https://fonts.google.com/icons?selected=Material+Icons) (including names)
### Alternatives
- [dioxus-free-icons](https://crates.io/crates/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.
© 2024 Lennart Kloock