Website | Nightly Docs | Stable Docs | Book | Discord
Freya is a native GUI library for Rust powered by 𧬠Dioxus and π¨ Skia.
fn app(cx: Scope) -> Element {
let mut count = use_state(cx, || 0);
render!(
rect {
height: "20%",
width: "100%",
background: "rgb(233, 196, 106)",
padding: "12",
color: "rgb(20, 33, 61)",
label {
font_size: "20",
"Number is: {count}"
}
}
rect {
height: "80%",
width: "100%",
background: "rgb(168, 218, 220)",
color: "black",
padding: "12",
onclick: move |_| count += 1,
label { "Click to increase!" }
}
)
} |
Thanks to my sponsors for supporting this project! π
Note: main
branch currently depends on Dioxus 0.5.
Clone this repo and run:
cargo run --example counter
You can also try freya-template
Add Freya and Dioxus as dependencies:
freya = "0.1"
dioxus = { version = "0.4", features = ["macro", "hooks"], default-features = false }
- βοΈ Built-in components (button, scroll views, switch and more)
- π Built-in hooks library (animations, text editing and more)
- π Built-in devtools panel (experimental
β οΈ ) - π§° Built-in headless testing runner for components
- π¨ Theming support (not extensible yet
β οΈ ) - π©οΈ Cross-platform (Windows, Linux, MacOS)
- πΌοΈ SKSL Shaders support
- ποΈ Dioxus Hot-reload support
- π Multi-line text editing (experimental
β οΈ ) - π¦Ύ Basic Accessibility Support (experimental
β οΈ ) - π§©Compatible with dioxus-sdk and other Dioxus renderer-agnostic libraries
- Performant and low memory usage
- Good developer experience
- Cross-platform support
- Decent Accessibility support
- Useful testing APIs
- Useful and extensible components and hooks
You can see the tracking issue to know what features are implemented and which ones are not, yet.