Fynix is a backend agnostic reactive view tree, styled the way Typst styles a document with set and show rules.
gallery_recording_1080p30.mp4
- Views, rules and transitions never name an engine.
- A view asks for the token traits it reads, so it works under any theme that implements them.
- Set and show rules restyle every view of a kind within a scope, as in Typst.
- State rules hold while a node is hovered, pressed, entering, leaving, or in any state of your own.
- Props bound to the world are read again only when their source changes.
- Views can animate their changes, and animate in and out of the tree.
#![no_std], withalloconly.
The fynix README walks through each of
these with examples.
// A heading and a button whose label turns accent on hover.
mount::<MyTheme>(
world,
column((
label("Settings").size(20.0),
button(label("Save"))
.when::<Hovered, _>(|cx: &mut Cx<Bevy, MyTheme>| {
cx.set::<Label>(|l, _| l.tone(Tone::Accent));
})
.transition(Motion::Interact),
))
.gap(8.0),
);fynix: the core crate, with a guide to building a UI framework on top of it.fynix_macros: the#[element]macro.bevy_fynix: the Bevy backend, with a gallery example and ready-made looks.
You can join us on the Voxell discord server.
fynix is dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.