bevy_extended_ui
Since I've been writing a game in the Bevy engine lately, I created this crate. In my game, I need more complex UI elements that Bevy doesn't currently support. These include sliders, choice boxes, check boxes, radio buttons, and so on. So I set about implementing these elements using the standard bevy_ui system. I'd like to make this project available to you so that you can use elements other than just nodes, buttons, or images. If you're missing a widget and know how to create it, it would be great if you could add it. Otherwise, feel free to create a ticket.
Features
There are many features in this crate. You can see all current supported widgets here. Available features:
- Full HTML support.
- CSS support but not all CSS properties.
- Hot reload support.
- HTML Bind support for interacting with the code.
- Font support for family and weight.
- Animation support (
@keyframes). - Validation for widgets like required fields.
- CSS
*support. - Form Widget for validation and submission.
- Custom Cursor or system cursor support.
- Customizable theme.
There are many other things, but currently you can use the core (HTML / CSS) features.
Toolchains
This project supports both stable and nightly Rust.
- Default:
stableviarust-toolchain.toml - Nightly:
cargo +nightly-2025-08-07 ...orrustup override set nightly-2025-08-07 - Optional: use
rust-toolchain-nightly.tomlas a drop-in replacement if you want nightly by default
How to use?
Add this to your Cargo.toml:
[]
= "1.2.0"
= "1.2.0"
Then, you add the plugin to your main.rs or on any point at a build function:
Then you create an HTML file:
Title
<!-- You can link your CSS file here. -->
<!-- <link rel="stylesheet" href="base2.css"> You can add more CSS files.-->
<!-- You can use HTML bindings here. like the onclick attribute. -->
Button
And finally,
Note that currently you can use this binding:
onclickonchangeOnly for<select>,<fieldset>,<input>,<checkbox>and<slider>elements.oninitonmouseoveronmouseoutonfoucsonscrollonkeydownonkeyupondragstartondragondragstop
WASM support
Now we have wasm support but still not fully tested! Here is an example to show you how to use it:
and the index HTML:
<!doctype html>
Bevy Web
It was tested with the crate trunk, which worked well. This trunk.toml file was used:
[]
= "dist"
[[]]
= "assets"
= "assets"
[]
= true
Animation support
Basic @keyframes usage example:
{
0% }
50% }
100% }
}
}
You can now use @keyframes in your CSS. There is now a limit tested; this means that you can use any CSS property.
What comes next?
Next, I'd like to build a website that's structured like React documentation. There you'll always be able to see all the patches and how to apply them! If anyone has any ideas, I'd be happy to hear them.
Compatibility
Note: This project is currently under construction and not suitable for large projects!.
Bevy version |
bevy_extended_ui version |
|---|---|
| 0.18.0 | 1.2.0 - 1.3.0 |
| 0.17.0 | 1.0.0 - 1.1.0 |
| 0.16.0 | 0.1.0 - 0.2.2 |
Important Links
Link to Widget attributes Link to Event Rules Link to Language Rules Link to CSS Properties Link to Patches