4 releases

0.1.6 Aug 27, 2023
0.1.5 Aug 27, 2023
0.1.1 Aug 27, 2023
0.1.0 Aug 16, 2023

#1592 in GUI

Download history 14/week @ 2024-12-07 4/week @ 2024-12-14 1/week @ 2024-12-28

162 downloads per month

MIT license

450KB
10K SLoC

Freya ๐Ÿฆ€

Freya logo

Discord Server Github Sponsors codecov

Website | 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
~783K SLoC