1 unstable release

new 0.2.4 Jan 26, 2025

#583 in Game dev

MIT license

4MB
5.5K SLoC

Contains (WOFF font, 99KB) fontawesome-webfont.woff, (WOFF font, 99KB) fontawesome-webfont.woff, (WOFF font, 78KB) fontawesome-webfont.woff2, (WOFF font, 78KB) fontawesome-webfont.woff2, (WOFF font, 45KB) open-sans-v17-all-charsets-300.woff2, (WOFF font, 41KB) open-sans-v17-all-charsets-300italic.woff2 and 20 more.

Famiq

Simplifying UI Development in Bevy engine

What is Famiq?

Famiq is a UI library wrapped around Bevy UI module by providing default widgets and a simple way to manage styles. Instead of writing Rust code for styling, developers can define styles in a well known JSON file. These styles are then parsed into Bevy's native UI styles, significantly reducing boilerplate code.

let mut builder = FamiqWidgetBuilder::new(&mut commands, &mut builder_res, &asset_server);

let txt = fa_text(&mut builder, "SIGN UP").build();

let f_name = fa_text_input(&mut builder, "First name").build();
let l_name = fa_text_input(&mut builder, "Last name").build();
let name_container = fa_container(&mut builder)
    .id("#name-container")
    .children([f_name, l_name])
    .build();

let ask = fa_selection(&mut builder, "Select your subscription").choices(["Personal", "Team"]).build();
let ask_container = fa_container(&mut builder).id("#ask-container")
    .children([ask])
    .build();

let btn = fa_button(&mut builder, "Confirm").build();

fa_container(&mut builder).id("#container")
    .children([txt, name_container, ask_container, btn])
    .build();

hot-reload can be enabled during development so that any changes made to the json file are reflected immediately in the running app, no need to re-compile.

Installation

Get latest version of Famiq by adding this line to Cargo.toml. Currently, crate & rustdoc are not available yet.

[dependencies]
famiq = { git = "https://github.com/muongkimhong/famiq", tag = "v0.2.4" }

Documentation

Contributing

Famiq needs your contributions to grow. Please see contributing.

Versions

Famiq is in early stage of development. Currently, it supports only 0.15.x onward.

Goals

  • API Improvements
  • Provide more useful default widgets

License

Famiq is released under the MIT License.

Dependencies

~30–63MB
~1M SLoC