freya 0.2.2

Cross-platform GUI Library powered by Dioxus and Skia.
Documentation

Freya ๐Ÿฆ€

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! ๐Ÿ˜„

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