Website | Nightly Docs | Stable Docs | Book | Discord
Freya is a cross-paltform GUI library for Rust powered by 𧬠Dioxus and π¨ Skia.
It does not use any web tech, check the Differences with Dioxus.
fn app() -> Element {
let mut count = use_signal(|| 0);
rsx!(
rect {
height: "50%",
width: "100%",
main_align: "center",
cross_align: "center",
background: "rgb(0, 119, 182)",
color: "white",
shadow: "0 4 20 5 rgb(0, 0, 0, 80)",
label {
font_size: "75",
font_weight: "bold",
"{count}"
}
}
rect {
height: "50%",
width: "100%",
main_align: "center",
cross_align: "center",
direction: "horizontal",
Button {
onclick: move |_| count += 1,
label { "Increase" }
}
Button {
onclick: move |_| count -= 1,
label { "Decrease" }
}
}
)
} |
Thanks to my sponsors for supporting this project! π
π Make sure to check the Setup guide first.
β οΈ If you happen to be on Windows usingwindows-gnu
and get compile errors, maybe go check this issue.
Clone this repo and run:
cargo run --example counter
You can also try freya-template
Add Freya and Dioxus as dependencies:
freya = "0.2"
dioxus = { version = "0.5", 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
- π§° Built-in headless runner to test UI
- π¨ Theming support (not extensible yet
β οΈ ) - π©οΈ Cross-platform (Windows, Linux, MacOS)
- πΌοΈ SKSL Shaders support
- ποΈ Dioxus Hot-reload support
- π Multi-line text editing
- π¦Ύ 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 built-in components and hooks
Valin βοΈ is a Work-In-Progress cross-platform code editor, made with Freya π¦ and Rust, by me.