Skip to content
wirelessEye edited this page Jun 29, 2026 · 2 revisions

Nestix Wiki

Nestix is a React-like declarative layout and state management library for Rust. It provides the component tree, reactive signal system, props/builders, layout syntax, and lifecycle hooks needed to build UI libraries and applications.

Nestix is intentionally renderer-agnostic. The core crate does not create DOM nodes, native views, terminal widgets, or any other platform-specific host objects. A renderer or component library supplies host components that use Nestix elements, placement callbacks, and handles to attach real UI objects.

This wiki documents the Rust crates under nestix/:

  • nestix: the main public API, including elements, components, props, layout, built-in components, and re-exports.
  • nestix-signal: reactive state, computed values, effects, readonly signals, and shared pointer utilities.
  • nestix-macros: component, props, layout, callback, closure, computed, and effect macros.

Start Here

Minimal Example

use nestix::{Element, callback, component, computed, create_state, layout};

#[component]
fn Counter() -> Element {
    let count = create_state(0);

    layout! {
        Div(.class = "counter".to_string()) {
            Text(computed!([count] || format!("Count: {}", count.get())))

            Button(
                .on_click = callback!([count] || {
                    count.mutate(|value| *value += 1);
                }),
            ) {
                Text("Click")
            }

            if count.get() % 2 == 0 {
                Text("Is even")
            }
        }
    }
}

Div, Text, and Button are not built into Nestix core. They are examples of host components that a renderer or UI library provides.

Clone this wiki locally