Build native & cross-platform GUI applications using 🦀 Rust.
Powered by 🧬 Dioxus and 🎨 Skia.
Freya is in development, you can learn more in the book.
fn app(cx: Scope) -> Element {
let mut count = use_state(cx, || 0);
rsx!(
rect {
height: "20%",
width: "100%",
background: "rgb(233, 196, 106)",
padding: "25",
color: "rgb(20, 33, 61)",
label {
font_size: "20",
"Number is: {count}"
}
}
rect {
height: "80%",
width: "100%",
background: "rgb(73, 151, 222)",
color: "black",
padding: "25",
onclick: move |_| count += 1,
label { "Click to increase!" }
}
)
}