# bevy_pages
**A lightweight and elegant framework to upgrade your Bevy UI experience.**
---
[](https://crates.io/crates/bevy_pages)
[](https://docs.rs/bevy_pages)
[](https://bevy.org/learn/quick-start/plugin-development/#main-branch-tracking)
---
This is a crate extending [bevy](https://bevy.org) to add support for XML-based UI pages. Kinda like an HTML page, but
with XML
## Features
- **🪽 Lightweight:** Bevy is already huge enough. This crate focuses on extending bevy with minimum overhead and quick
compilation, so it only has a few core dependencies and even the XML parsing is partially done manually.
- **⚡ Fast:** The only existent overhead is parsing the XML files, which is already very fast. The plugin itself only
adds basic functionality for handling events and elements.
- **📜 Expressive:** Use the power of XML to create dynamic and interactive UIs with ease and simple syntax.
- **✒️ Fully documented:** I added my signature `#[warn(missing_docs)]` 😊
- **👁️ Built-in Auto-Completion:** Use the official [XSD Schema](schema.xsd) to enable auto-completion inside your
favorite IDE.
- **✨ Extended Widget Catalog:** The framework has a lot of complex extra widgets like a dropdown, a scroll view or a
text input widget.
## Getting Started
After adding `bevy_pages` to your project, you can start coding your XML pages.
An XML page roughly looks like this:
```xml
<?xml version="1.0" encoding="utf-8"?>
<Page
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/DraftedDev/bevy_pages/master/schema.xsd">
</Page>
```
**NOTE:** If you have issues with the remote `schema.xsd`, you are free to download it locally and link it in your XML.
You will also need to add the `PagesPlugin` to your app and use the `PageSpawner` to spawn your page:
```rust
fn spawn_my_page(assets: Res<AssetServer>, mut spawner: ResMut<PageSpawner>) {
let page = assets.load("my_page.xml");
spawner.spawn(page);
}
```
### Learning Resources
- [The Official Guide](guide/README.md)
- [The Quick Start Tutorial](guide/quick-start.md)
- [The Official Examples](examples)
## Bevy Support
The following table shows the supported `bevy` versions:
| bevy | bevy_pages |
|------|----------------|
| 0.19 | 0.1.0 - latest |