Components Overview
UltimateUI.Components is the declarative layer on top of the Core DOM API. The
default entry point is UltimateAppBuilder, Window, and function components.
The rendered tree is still made of normal UltimateUI.Element instances.
Packages:
UltimateUI.Components: runtime, hooks, and CSS-in-C#.UltimateUI.Components.SourceGen: Roslyn analyzer for*.uui.csx.UltimateUI: meta-package that re-exports the runtime; CSX still needs the analyzer reference.
var builder = UltimateAppBuilder.CreateDefaultBuilder();
var app = builder.Build();
var window = app.MainWindow = new Window();
window.Render(ctx =>
{
var count = ctx.UseState(0);
var button = new Button($"Clicked {count.Value}");
button.OnClick += (_, _) => count.Update(static value => value + 1);
return button;
});
return await app.RunAsync();
RunAsync creates the WebKitGTK render host, loads window styles, performs the
first render, and enters the window event loop. Later state setters request a
render and replace the host child subtree. This keeps the developer workflow in
place while leaving room for keyed diffing later.