Skip to content
voxell-techPublic

About

A backend agnostic reactive element tree.

Topics

Resources

Stars

11 stars

Watchers

0 watching

Forks

Repository files navigation

Fynix

License Crates.io Downloads Docs CI Discord

Fynix is a backend agnostic reactive view tree, styled the way Typst styles a document with set and show rules.

gallery_recording_1080p30.mp4

Features

  • 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], with alloc only.

The fynix README walks through each of these with examples.

Example

// 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),
);

Where Next

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

Join the community!

You can join us on the Voxell discord server.

License

fynix is dual-licensed under either:

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.

About

A backend agnostic reactive element tree.

Topics

Resources

Stars

11 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages