1 unstable release

0.1.0 Aug 16, 2023

#1223 in GUI

Download history 43/week @ 2024-01-04 44/week @ 2024-01-11 28/week @ 2024-01-18 28/week @ 2024-01-25 11/week @ 2024-02-01 23/week @ 2024-02-08 44/week @ 2024-02-15 60/week @ 2024-02-22 42/week @ 2024-02-29 53/week @ 2024-03-07 45/week @ 2024-03-14 75/week @ 2024-03-21 93/week @ 2024-03-28 47/week @ 2024-04-04 69/week @ 2024-04-11 34/week @ 2024-04-18

253 downloads per month
Used in 12 crates

MIT license

40KB
937 lines

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
  • Ggood 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

~1–7.5MB
~41K SLoC