Skip to content
forked from marc2332/freya

Native GUI library for 🦀 Rust powered by 🧬 Dioxus and 🎨 Skia.

License

Notifications You must be signed in to change notification settings

zuiyu1998/freya

 
 

Repository files navigation

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

About

Native GUI library for 🦀 Rust powered by 🧬 Dioxus and 🎨 Skia.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 95.7%
  • CSS 1.9%
  • Handlebars 1.3%
  • Other 1.1%