11 releases

0.2.2 Apr 27, 2024
0.2.1 Apr 27, 2024
0.1.8 Aug 27, 2023
0.1.1 Nov 19, 2022

#107 in GUI

Download history 24/week @ 2024-07-22 28/week @ 2024-07-29 22/week @ 2024-08-05 20/week @ 2024-08-12 20/week @ 2024-08-19 42/week @ 2024-08-26 71/week @ 2024-09-02 56/week @ 2024-09-09 44/week @ 2024-09-16 86/week @ 2024-09-23 71/week @ 2024-09-30 39/week @ 2024-10-07 34/week @ 2024-10-14 17/week @ 2024-10-21 24/week @ 2024-10-28 20/week @ 2024-11-04

105 downloads per month
Used in dioxus-i18n

MIT license

1MB
19K SLoC

Freya 🦀

Freya logo

Discord Server Github Sponsors codecov

Website | Nightly Docs | Stable Docs | Book | Discord

Freya is a native GUI library for Rust powered by 🧬 Dioxus and 🎨 Skia.

⚠️ It's currently work in progress and not usable for production, but you can already play with it! You can join the Discord server if you have any question or issue.



fn app() -> Element {
    let mut count = use_signal(|| 0);

    render!(
        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" }
            }
        }
    )
}

Freya Demo

Sponsors 🤗

Thanks to my sponsors for supporting this project! 😄

Alberto Mendezandar1an

Want to try it? 🤔

⚠️ First, see Environment setup.

Clone this repo and run:

cargo run --example counter

You can also try freya-template

Usage 📜

Add Freya and Dioxus as dependencies:

freya = "0.2"
dioxus = { version = "0.5", features = ["macro", "hooks"], default-features = false }

Features ✨

  • ⛏️ 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

Goals 😁

  • Performant and low memory usage
  • Good developer experience
  • Cross-platform support
  • Decent Accessibility support
  • Useful testing APIs
  • Useful and extensible components and hooks

MIT License

Dependencies

~28–72MB
~1M SLoC