A GUI library for Rust powered by Skia and Dioxus.
fn app(cx: Scope) -> Element {
let mut count = use_state(&cx, || 0);
cx.render(rsx!(
container {
height: "20%",
width: "100%",
background: "rgb(233, 196, 106)",
padding: "25",
color: "rgb(20, 33, 61)",
label {
font_size: "20",
"Number is: {count}"
}
}
container {
height: "80%",
width: "100%",
background: "rgb(168, 218, 220)",
color: "black",
padding: "25",
onclick: move |_| count += 1,
label { "Click to increase!" }
}
)) |
Note for Windows: You need Visual Studio 2022.
Windows & MacOS:
cargo run --example counter
Linux:
cargo run --example counter --features x11
- Label and paragraphs
- Containers and rectangles
- Scroll views (nested too)
- Click, wheel, mouse /down/leave/over events
- Windows, Linux (needs
x11
feature) and MacOS support - Components library
- Animation hook
- Fast
- Low memory usage
- Lightweight
- Secure
- Full cross platform
- Fluid animations
- Tauri integration
- Devtools
Besides all the tracking issues, here are some of the things to do:
- Support for percentages in padding
- Add
Flex
component (using taffy). - Documentation
- Improve Auto calculation for width and height
- Investigate if
image
diffing can be speeded up (reference: DioxusLabs/dioxus#543 (comment)) - Better touchpad support
- Move layout calculation from the layout engine into the node's state? Not sure.
- Render shadows one layer below it's element to avoid overlapping with it's siblings