bevy_material_ui 0.2.2

Material Design 3 UI components for Bevy game engine
Documentation

bevy_material_ui

CI Crates.io Docs.rs Dependencies License: MIT

Bevy Material UI demo video

A Material Design 3 UI library for Bevy.

Installation

[dependencies]
bevy_material_ui = "0.1"

Documentation

Features

  • Material Design 3 Components: Buttons, FABs, Cards, Checkboxes, Switches, Radio Buttons, Sliders, Text Fields, Dialogs, Lists, Menus, Tabs, Progress Indicators, and more
  • Date/Time Picker: Material-style date and time picker component (see the showcase for an end-to-end example)
  • Material Symbols Icons: Full support for Material Symbols icon font with 3,000+ scalable icons
  • Theming: Dynamic color system with light/dark mode support
  • Animations: Motion system following MD3 guidelines
  • Accessibility: Proper touch targets and focus handling

Material Symbols Icons

This library includes the Material Symbols Outlined variable font from Google. The font is automatically loaded when you add the MaterialUiPlugin.

Using Icons

use bevy::prelude::*;
use bevy_material_ui::prelude::*;

fn spawn_icon(mut commands: Commands, icon_font: Res<MaterialIconFont>) {
    // Spawn a home icon
    commands.spawn((
        Text::new(MaterialIcon::home().as_str()),
        TextFont {
            font: icon_font.0.clone(),
            font_size: 24.0,
            ..default()
        },
        TextColor(Color::WHITE),
    ));
}

Available Icons

Common icons are available as methods on MaterialIcon:

  • Navigation: home(), menu(), arrow_back(), close(), check()
  • Actions: add(), delete(), edit(), save(), search(), settings()
  • Toggle: checkbox_checked(), radio_checked(), star(), favorite()
  • Media: play_arrow(), pause(), volume_up(), skip_next()
  • And many more...

Or use any icon codepoint directly:

use bevy_material_ui::icons::ICON_SETTINGS;

let icon = MaterialIcon::new(ICON_SETTINGS);

For the complete list of icons, see Material Symbols.

License

This library is licensed under MIT.

The Material Symbols font is licensed under the Apache License 2.0 by Google. See assets/fonts/LICENSE for details.

Releases (semantic versioning)

Publishing to crates.io is automated via GitHub Actions and uses tags of the form vMAJOR.MINOR.PATCH.

  1. Update version in Cargo.toml.
  2. Commit and push to main.
  3. Create and push a tag like v0.1.1.

The workflow in .github/workflows/publish.yml verifies the tag matches Cargo.toml and then runs cargo publish.