Under active development · the API is not yet stable

Native user interfaces, written in Rust.

zgui is a retained user interface framework for desktop applications. Components and fine-grained signals describe what the interface is; CSS decides how it looks; a pipeline the framework owns end to end turns that into pixels.

use zgui::prelude::*;

#[component]
fn Counter() -> impl IntoView {
    let count = RwSignal::new(0);

    view! {
        column(class = "counter") {
            text(class = "value") {{move || count.get().to_string()}}
            control(on:click = move |_| count.update(|n| *n += 1)) {
                "Increment"
            }
        }
    }
}

Components run once

A component function builds its part of the document a single time. After that, only the closures that read a changed signal run again. There is no virtual tree and no diff.

Appearance is CSS

Selectors, the cascade, inheritance, flexbox, grid, gradients, shadows, filters and transforms — checked at compile time, over a rendering pipeline of the framework’s own.

Nothing is a browser

No webview, no HTML, no JavaScript. A real window, a real GPU surface, and a document the framework owns from the first node to the last pixel.

Cost follows change

The document, the computed styles, the box tree, the shaped text, the display list and the pixels all survive between frames. A frame redraws the damage and nothing else.

New to user interface programming? The guide assumes you know Rust well and assumes nothing else. It starts at what a user interface framework has to do and builds up from there.