Streaming
Each statement is parsed once, as it arrives. The screen starts to fill in with the first line.
v0.2.1Autofix now reads past a bad token: 99.5% valid on gpt-5-nano
Your model answers in a compact language for interfaces. GistUI renders it as real components while it streams.




Works with the model and
the provider you already use
Dashboards, forms, reports, slide decks and guides. Each one is a real GistUI answer, rendered with the default components.


Swap any built-in for your own shadcn/ui, MUI or design-system component.
A submit arrives as typed values with a JSON Schema, through one callback.
Theme presets and design tokens, the same in every framework.
Engine
GistUI is a small runtime between your model and your components. It reads the answer, checks it, and draws it.
Each statement is parsed once, as it arrives. The screen starts to fill in with the first line.
When a model slips, the program is repaired in code and shown in place. There is no second model call.
React, Vue, Svelte, Solid or vanilla JS, with the same 63 components in each.
A program cannot run code. Tools that change something run only when a person presses a button.
The runtime and the default components load together. Heavier parts load on demand.
Benchmarks
Against OpenUI, on its own sample screens and its own benchmark. Every script and every answer is in the repository.
Main-thread time in Chrome · lower is better
The dashboard from OpenUI's own samples, streamed at about 100 tokens a second: 2,204 ms of work for OpenUI, 492 ms for GistUI. Across all eight screens tested, GistUI needed 2 to 6 times less.
System prompt + answer, gpt-oss-120b · lower is better
The same 46 screens on OpenUI's benchmark: a 3,874-token prompt and 587-token answers for GistUI, 5,017 and 601 for OpenUI.
KB gzip, default components · lower is better
Renderer plus the default component library, minified and gzipped, React excluded. Measured the same way on both (@openuidev/react-ui 0.16.3).
Get started
Install the package for your framework, give your model the system prompt, and point the component at the response.
Add @gistui/react and the stylesheet to your app.
On the server, prompt().text from @gistui/catalog is the system prompt.
Point the component at the response stream. Buttons and forms come back through one callback.
// npm install @gistui/react @gistui/styles
import "@gistui/styles/styles.css";
import { GistUI } from "@gistui/react";
import { ui } from "@gistui/react/ui";
<GistUI library={ui} stream={response.body} onAction={handle} />
Yes. GistUI only needs a text stream. It reads OpenAI-compatible, Anthropic, AI SDK and AG-UI streams, so gateways and direct provider APIs both work.
Your app gets it through one callback, onAction. A form submit arrives with typed values, a JSON Schema for them and a readable summary.
A program is treated as untrusted. It cannot run code, read-only tools and tools that change something are separate, images load only from hosts you allow, and nesting, loops and sizes all have limits.
Yes. Replace any built-in component with yours, add new ones with a schema, or restyle the defaults with tokens. There is a worked example with shadcn/ui and Tailwind.
No. Anything that can show a stream of text can show GistUI: a dashboard that answers a question, a report, a form built for one task. The chat layout is one optional package.