Crate viewbuilder

source ·
Expand description

Viewbuilder

Cross-platform user interface framework for Rust.

This crate provides an HTML-like render API for the backend of a UI. It supports layout, drawing, and accessability.

use viewbuilder::{Context, Element, NodeKey};
use taffy::prelude::{AlignItems, JustifyContent};

fn app(cx: &mut Context) -> NodeKey {
    Element::new()
        .align_items(AlignItems::Center)
        .justify_content(JustifyContent::Center)
        .child(cx.insert("Hello World!"))
        .build(cx)
}

Re-exports

Modules

Structs

  • Render context for a UI tree.
  • Key to access a node in a tree.

Functions

  • Run the user interface tree.