Server-rendered TypeScript UI framework...
t-sui is a TypeScript server-rendered UI framework.
Node objects that compile to JavaScript strings (document.createElement() calls).ui.Div, ui.Span, ui.Button, etc.)ToJS, ToJSReplace, ToJSAppend, ToJSPrepend, ToJSInnerCollect-based field collectionResponseBuilder for complex updatesctx.Push() and broadcast via app.Broadcast()__nav(url) with layout content injectionimport ui from "./ui";
import { MakeApp, type Context } from "./ui.server";
const app = MakeApp("en");
app.Page("/", "Home", function (_ctx: Context) {
return ui.Div("p-6").Render(ui.Div("text-2xl").Text("Hello"));
});
app.Listen(1423);
ui.Div, ui.Span, ui.Button, ui.P, etc.app.Page handler returns Node (not string).app.Action handler returns string (JS code).{ Name, Data?, Collect? } or ui.JS("code") for inline JS.ui.Target() returns a random string ID, not an object./users/:id with ctx.PathParams["id"].ctx.Patch, ctx.Submit, ctx.Click, ctx.Call — use OnClick/OnSubmit with action objects.examples/app.ts — app configuration, layout, and route registrationexamples/main.ts — local dev entrypointexamples/pages/ — 35 feature pagesexamples/tests/ — behavior tests