Skip to content
/ freya Public
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

load1n9/freya

 
 

Repository files navigation

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!(
        container {
            height: "20%",
            width: "100%",
            background: "rgb(233, 196, 106)",
            padding: "12",
            color: "rgb(20, 33, 61)",
            label { 
                font_size: "20", 
                "Number is: {count}"
            }
        }
        container {
            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 as a dependency via git (it's not published on crates.io yet) in your Cargo.toml:

freya = { git = "https://github.com/marc2332/freya" }
dioxus = { git = "https://github.com/DioxusLabs/dioxus", rev="0527cff3a59ba3176f7510a7234c5977ce1b17d7", features = ["macro", "hooks"]}

Features ✨

  • Support for Windows, Linux and MacOS
  • Text, containers, images, svg, etc
  • Headless testing
  • Hot reload
  • Optional DevTools panel
  • Easy multiline text editing
  • Components crate (with theming support)
    • Scroll views
    • Virtualized scroll views
    • Button
    • Slider
    • Switch
    • Dropdown
    • and a few more
  • Keyboard and Mouse events
  • Hooks crate for text editing, animating, theming..

Goals 😁

  • Performant and low memory usage
  • Good developer experience
  • Cross-platform
  • Provide accessibility APIs
  • Provide testing APIs
  • Provide useful built-in components and hooks

Status ⌚

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

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 92.0%
  • CSS 4.8%
  • Handlebars 3.2%