A comprehensive Material Design 3 component library for Bevy game engine.
- Back to main README: ../README.md
- Developer guide: ./DEVELOPER_GUIDE.md
| Component | Description | Documentation |
|---|---|---|
| Button | Filled, outlined, and text buttons with state layers | View |
| Card | Elevated, filled, and outlined cards | View |
| Checkbox | Checkboxes with animation | View |
| Chip | Assist, filter, input, and suggestion chips | View |
| Dialog | Modal dialogs with actions | View |
| Divider | Horizontal and vertical dividers | View |
| FAB | Floating action buttons | View |
| Icon Button | Icon-only buttons | View |
| List | Lists with selection support | View |
| Menu | Dropdown menus | View |
| Progress | Linear and circular progress indicators | View |
| Radio | Radio button groups | View |
| Select | Dropdown select components | View |
| Slider | Range sliders | View |
| Snackbar | Toast notifications | View |
| Switch | Toggle switches | View |
| Tabs | Tab navigation | View |
| Text Field | Input fields with validation | View |
| Tooltip | Hover tooltips | View |
| DateTime Picker | Date and time picking dialogs | View |
Add to your Cargo.toml:
[dependencies]
bevy_material_ui = { path = "../bevy_material_ui" }Basic setup:
use bevy::prelude::*;
use bevy_material_ui::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(MaterialUiPlugin)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands, theme: Res<MaterialTheme>) {
commands.spawn(Camera2d::default());
// Your UI here
}The library uses Material Design 3 color tokens. Access colors through MaterialTheme resource:
fn my_system(theme: Res<MaterialTheme>) {
let primary = theme.primary;
let surface = theme.surface;
let on_primary = theme.on_primary;
// etc.
}To see all components in action, run the interactive showcase:
cargo run --example showcaseThe showcase provides a comprehensive demo of every component with:
- Live interaction and state changes
- Multiple variants and configurations
- Theme switching (light/dark mode)
- Responsive layout examples
Navigate through the sidebar to explore each component category.
Run the dedicated layout demo:
cargo run --example layouts_demoOther examples are available in the examples/ folder:
cargo run --example button_demo
cargo run --example select_demoRun the full test suite:
cargo testThe showcase can emit a telemetry.json file with element bounds and recent UI events
for automation tooling. Enable it via an environment variable:
BEVY_TELEMETRY=1 cargo run --example showcaseThe file is written to the project root as telemetry.json.
📺 Video Demo: For a walkthrough of the UI components, see the demo video (coming soon).