jkelleyrtp / viewbuilder

Cross-platform user interface framework for Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Viewbuilder

Crates.io version docs.rs docs CI status

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.

fn App(cx: Scope) -> Element {
    let mut count = use_state(cx, || 0);

    cx.render(rsx! {
        view {
            flex_direction: FlexDirection::Column,
            "High five count: {count}",
            view {
                flex_direction: FlexDirection::Row,
                view { onclick: move |_| count += 1, "Up high!" },
                view { onclick: move |_| count -= 1, "Down low!" }
            }
        }
    })
}

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.

About

Cross-platform user interface framework for Rust.

License:Apache License 2.0


Languages

Language:Rust 100.0%