Unity UI Toolkit, declaratively

A considered UI layer for Unity.

LumaFlow brings declarative composition, reactive state, navigation, virtualized lists and application-scale UI patterns to Unity—while UI Toolkit remains the native rendering and layout layer.

Version 0.1.1 · Unity 6 and newer

Write a UI as a clear description of what it should be.

Widgets are immutable descriptions. State stays explicit. Compatible updates reconcile against retained UI Toolkit elements instead of replacing the rendering layer beneath your application.

A small surface, with the framework doing the repetitive work.

Describe a screen with typed C# building blocks. LumaFlow retains the mounted tree and updates the branch that reads changed state.

ProjectCard.cs
new Card(
  new Column(
    gap: 12f,
    children: new Widget[] {
      new Text("Project overview"),
      new LinearProgressIndicator(progress),
      new Button("Open project", OpenProject)
    }
  )
);
Compose

Typed layouts and controls reflect UI Toolkit’s flex model.

React

State<T> updates only the subscribed branch.

Retain

Compatible widgets reconcile in place, preserving local identity.

The pieces of an application interface, kept in one model.

Compose with intent

Rows, columns, constraints, scrolling and responsive layouts are expressed as typed widgets. Themes, text scale and localization are inherited scopes rather than loose global values.

  • Typed flex and constraint composition
  • Component themes and interaction states
  • Accessibility semantics and focus traversal

Navigate without scene coupling

A retained navigator owns routes and in-memory snapshots. Overlay controllers manage dialogs, drawers, popovers, tooltips and toasts in a separate scoped stack.

Scale lists natively

ListView<T> maps to UI Toolkit’s virtualized ListView. The visible and recycle range is mounted; the whole source is not.

Animate locally. Inspect explicitly.

Implicit animations retarget compatible widgets from their displayed value and respect a tree-scoped reduced-motion policy. Widget Inspector captures immutable mount snapshots, native element identity, layout and actionable lifecycle findings.

A framework layer, not a second UI engine.

LumaFlow maps declarative widgets to retained UI Toolkit elements. It does not introduce a custom renderer, JavaScript runtime or another layout system.

Widget

Immutable configuration

WidgetNode

Mounted reconciliation boundary

VisualElement

Native Unity UI Toolkit

Native Flexbox / Yoga layout

Native input and focus

Native ListView virtualization

UI Toolkit ownership remains visible

A runtime dashboard is the framework’s integration surface.

Its responsive shell, one-, two- and four-column metric composition, and wide or compact project rows are built from LumaFlow widgets. Direct UI Toolkit access stays at the bootstrap boundary that owns the external UIDocument root and MountHandle lifecycle.

The framework repository contains the package source, importable sample, documentation and changelog.

Widget InspectorRefresh
ApplicationRoot Mount #01
NavigatorHost VisualElement
ProjectOverview state: Loaded
LinearProgressIndicator 0.68
Button focused
LF1001 Stateful sibling has positional identity

See the mounted tree—not a proxy of it.

Open Window › LumaFlow › Widget Inspector to capture active mounts. Snapshots include widget and state types, native UI Toolkit identity, resolved layout, inherited aspects and actionable findings.

The tree at left is an illustrative snapshot model, not a product screenshot.

Read the inspection workflow

Mount into the root you already own.

LumaFlow is published as the Unity package com.sahland.lumaflow. Install it through Unity Package Manager with https://github.com/sahland/lumaflow.git, then import the Getting Started sample.

Add the sample component to the same GameObject as its UIDocument; it resolves the document automatically.

Browse the framework source
ApplicationRoot.csC#
using LumaFlow;

private MountHandle? _mount;

void OnEnable() {
  _mount = LumaFlow.LumaFlow.Mount(
    new Text("Hello, LumaFlow"),
    document.rootVisualElement);
}

void OnDisable() {
  _mount?.Dispose();
}

Production-focused Unity tools, with room to think.

I build Unity developer tools with an emphasis on clean APIs, predictable behavior, performance and a polished developer experience. LumaFlow is the first public release.