viewbuilder 0.6.0-alpha.3

Cross-platform UI framework
docs.rs failed to build viewbuilder-0.6.0-alpha.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: viewbuilder-0.10.0-alpha.5

Cross-platform user interface framework for Rust.

This crate provides a moduler GUI library that can be used as an entire framework, or with individual parts.

#[tokio::main]
async fn main() {
    viewbuilder::transaction(|ui| {
        let child = ui.insert(
            View::builder()
                .background_color(Color4f::new(1., 0., 0., 1.))
                .build(),
        );

        ui.insert(
            View::builder()
                .background_color(Color4f::new(0., 1., 0., 1.))
                .on_click(move || {
                    viewbuilder::transaction(move |ui| ui[child].set_background_color(None))
                })
                .child(child.key)
                .build(),
        );
    });

    viewbuilder::run();
}

Features

  • Cross-platform with desktop and mobile support
  • Event handling with an HTML-like API
  • State management with dioxus (optional)
  • CSS flexbox and grid layout with taffy
  • Accessibility with accesskit
  • High performance rendering with rust-skia

Getting started

Instatllation is simple with:

cargo add viewbuilder --features full

If you encounter errors, please check the instructions for building rust-skia.