zgui: Leptos signals, browser-engine pipeline
Real CSS and fine-grained signals, with no webview and no HTML.
zgui is one of the youngest frameworks in this book. Its repository opened on 2 August 2026 and zgui 0.1.0 was published on 15 October. It combines two ideas the book has already met separately: Leptos's reactivity and a browser engine's rendering pipeline. Components run once. Signals then update only the nodes that read them, and every stage after that keeps whatever work it can reuse. That covers style, layout, text, paint and pixels.
use book_error::{Error, Result};
use zgui::prelude::*;
// Components run once. The closure around `count.get()` is a "reactive
// hole": it subscribes to `count` and rewrites one text node when it changes.
#[component]
fn Counter() -> impl IntoView {
let count = RwSignal::new(0);
view! {
column(class = "counter") {
text(class = "value") {{move || count.get().to_string()}}
control(
tabindex = Focus::Sequential,
on:click = move |_| count.update(|n| *n += 1)
) {
"Increment"
}
}
}
}
// Real CSS, cascaded by Stylo (Servo's style engine), not a Rust style DSL.
const STYLE: &str = css!(
".counter { gap: 12px; align-items: center; }
.value { font-size: 48px; font-weight: 700; }
control { padding: 8px 16px; border-radius: 8px; background: #356df3; }
control:hover { background: #477df8; }"
);
fn main() -> Result<()> {
app()
.with_title("Counter")
.with_stylesheet(STYLE)
.run(|| view! { Counter() })
.map_err(Error::other)
} This is not a lookalike of Leptos. zgui depends on Leptos's own reactive_graph crate, pinned to exactly 0.2.14, so signals, memos and effects behave as they do in Leptos. The stylesheet is also real CSS: selectors, the cascade, custom properties, flexbox, grid and transitions, resolved by Stylo, the style engine from Servo and Firefox. There is no HTML or DOM, though. zgui has a small native element vocabulary (column, text, control), and CSS selects those elements.
use book_error::{Error, Result};
use zgui::prelude::*;
use zgui_ui::prelude::*;
use zgui_ui_tokens::prelude::*;
// zgui-ui ports shadcn/ui. Every component reads its look from design
// tokens, so restyling the whole app is a theme, not a fork of the widgets.
#[component]
fn Deploy() -> impl IntoView {
let branch = RwSignal::new_local("main".to_owned());
let migrate = RwSignal::new_local(true);
view! {
Card {
CardHeader {
CardTitle {"Deploy storefront"}
CardDescription {"Ships the branch to production."}
}
CardContent {
Input(value = branch, label = "Branch")
Switch(checked = migrate, a11y:label = "Run migrations")
}
CardFooter {
Button(variant = ButtonVariant::Outline) {"Preview"}
Button {"Deploy"}
}
}
}
}
fn main() -> Result<()> {
app()
.with_title("Deploy")
.run(|| view! { ThemeProvider(scheme = ColorScheme::System) { Deploy() } })
.map_err(Error::other)
} The second crate, zgui-ui, ports most of shadcn/ui and themes it with design tokens. Changing the theme at runtime is a signal write. This matters because most toolkits in this book spend years before they have a usable widget set. zgui shipped with one, and the README's screenshots show a Kubernetes client, a music player and a code editor built on it.
The lockfile puts zgui very close to Blitz in this book's stack: Stylo for style, Parley 0.11.1 for text, Vello 0.9.0 for painting, AccessKit 0.24.1, winit 0.30.13 and wgpu 29.0.4. The difference is layout. zgui does not use Taffy. It uses cephal, an incremental layout engine by the same author, published on 10 October 2026, which patches only the dirty parts of the box tree. zgui also ships its own Wayland backend next to the winit one. The README warns that it is experimental and will break between 0.x releases. On 11 November 2026 it had 309 GitHub stars and fewer than 200 downloads.