3 releases

0.1.2 Sep 16, 2023
0.1.1 Aug 27, 2023
0.1.0 Aug 16, 2023

#1574 in GUI

Download history 2/week @ 2024-10-31 6/week @ 2024-12-05 7/week @ 2024-12-12

169 downloads per month
Used in freya-layout

MIT license

335KB
8K 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(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!" }
        }
    )
}

Freya

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.1"
dioxus = { version = "0.4", features = ["macro", "hooks"] }

Features โœจ

  • โ›๏ธ Built-in components (button, scroll views, switch and more)
  • ๐Ÿš‡ Built-in hooks library (animations, text editing and more)
  • ๐Ÿ” Built-in devtools panel (experimental โš ๏ธ) (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-std 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

Status โŒš

You can see the tracking issue to know what features are implemented and which ones are not, yet.

MIT License

Dependencies

~14โ€“52MB
~779K SLoC