| Crates.io | bevy_material_ui |
| lib.rs | bevy_material_ui |
| version | 0.2.7 |
| created_at | 2025-12-23 21:38:28.647215+00 |
| updated_at | 2026-01-25 22:04:35.77121+00 |
| description | Material Design 3 UI components for Bevy game engine |
| homepage | |
| repository | https://github.com/edgarhsanchez/bevy_material_ui |
| max_upload_size | |
| id | 2002357 |
| size | 13,623,309 |
A Material Design 3 UI library for Bevy.
[dependencies]
bevy_material_ui = "0.1"
cargo run --example showcaseBuild and run the WebGL showcase locally:
web/ output.Example commands:
rustup target add wasm32-unknown-unknowncargo install wasm-bindgen-cli --version 0.2.106cargo build --release --no-default-features --features bevy_minimal,webgl --target wasm32-unknown-unknown --example showcase_minimalwasm-bindgen --out-dir web --target web target/wasm32-unknown-unknown/release/examples/showcase_minimal.wasmweb/ folder (any static server)ImageNode tintingBy default, this crate uses the published google-material-design-icons-bin crate as its icon source.
Icons are embedded as ALPHA8 and expanded to RGBA8 (white + alpha) at runtime so Bevy UI tinting via ImageNode.color continues to work.
use bevy::prelude::*;
use bevy_material_ui::icons::{MaterialIcon, ICON_HOME};
fn spawn_icon(mut commands: Commands) {
// Spawn a home icon (tinted white)
if let Some(icon) = MaterialIcon::from_name(ICON_HOME) {
commands.spawn(icon.with_size(24.0).with_color(Color::WHITE));
}
}
Common icon name constants are available in bevy_material_ui::icons, for example:
ICON_HOME, ICON_MENU, ICON_ARROW_BACK, ICON_CLOSEICON_ADD, ICON_DELETE, ICON_EDIT, ICON_SEARCH, ICON_SETTINGSYou can also use arbitrary icon names (folder names from the upstream repo):
use bevy_material_ui::icons::MaterialIcon;
let icon = MaterialIcon::from_name("arrow_drop_down");
This library is licensed under MIT.
Publishing to crates.io is automated via GitHub Actions and uses tags of the form vMAJOR.MINOR.PATCH.
version in Cargo.toml.main.v0.1.1.The workflow in .github/workflows/publish.yml verifies the tag matches Cargo.toml and then runs cargo publish.