# Freya ๐ฆ
<a href="https://freyaui.dev/"><img align="right" src="logo.svg" alt="Freya logo" width="150"/></a>
[](https://discord.gg/sYejxCdewG)
[](https://github.com/sponsors/marc2332)
[](https://codecov.io/github/marc2332/freya)
**Freya** is a native GUI library for Rust powered by ๐งฌ [Dioxus](https://dioxuslabs.com) and ๐จ [Skia](https://skia.org/).
โ ๏ธ It's currently work in progress and not usable for production, but you can already play with it! You can join the [Discord](https://discord.gg/sYejxCdewG) server if you have any question or issue.
<br/>
<br/>
<table>
<tr>
<td style="border:hidden;">
```rust, no_run
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" }
}
}
)
}
```
</td>
<td style="border:hidden;">

</td>
</table>
### Sponsors ๐ค
Thanks to my sponsors for supporting this project! ๐
<a href="https://github.com/piny4man"><img src="https://github.com/piny4man.png" width="60px" alt="Alberto Mendez" /></a><a href="https://github.com/andar1an"><img src="https://github.com/andar1an.png" width="60px" alt="andar1an" /></a>
### Want to try it? ๐ค
โ ๏ธ First, see [Environment setup](https://book.freyaui.dev/setup.html).
Clone this repo and run:
```shell
cargo run --example counter
```
You can also try [`freya-template`](https://github.com/marc2332/freya-template)
### Usage ๐
Add Freya and Dioxus as dependencies:
```toml
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](./LICENSE.md)