The rendering engine for generative UI.
A model answers in GistUI Lang, a compact language for interfaces, and your app renders it as real,
interactive UI (dashboards, forms, reports, slide decks, galleries) while it streams.
Quick start · Packages · Benchmarks · Format spec · Changelog
The model writes a few lines of GistUI Lang:
root = Page(Header("Q3 revenue", "All regions"), kpis, Card(Chart(rev, type:line, y:"USD")))
kpis = Stats(kpiData)
kpiData = |Label|Value|Delta
|Revenue|$1.2M|+8%
|Customers|3,410|-2.1%
rev = |Month|Revenue
|Jul|380000
|Aug|402000
Your app shows a page with a header, two KPI cards and a line chart, filling in as the text arrives.
| Any framework | React, Vue, Svelte, Solid or vanilla JavaScript, with the same 63 components, look and behaviour in each. |
| Your own components | Replace any built-in one with your shadcn/ui, MUI or design-system component. Forms, validation, actions and dialogs keep working. |
| Repairs mistakes in code | When a model's answer ends with mistakes, the renderer fixes them, with no model call, and shows the fixed version in place. |
| Fast and small | The parser handles each statement once while streaming. The runtime is 32 KB and the default components are 74 KB on first load (gzip); heavier components load on demand. |
| Safe by default | A program is treated as untrusted: it cannot run code, tools that change something run only when a person presses a button, and images load only from hosts you allow. |
1. Install the package for your framework and the stylesheet.
npm install @gistui/react @gistui/styles # or @gistui/vue, @gistui/svelte, @gistui/solid, @gistui/vanilla2. Give your model the system prompt, where you call it.
import { prompt } from "@gistui/catalog";
const system = prompt().text;3. Render the answer in your app.
import "@gistui/styles/styles.css";
import { GistUI } from "@gistui/react";
import { ui } from "@gistui/react/ui";
<GistUI library={ui} stream={response.body} onAction={(a) => console.log(a)} />;Each package's README has the same three steps for its framework.
The repository has an agent skill, skills/gistui, and @gistui/catalog ships it.
After an install, tell your agent (Claude Code, Codex, Cursor…):
Read node_modules/@gistui/catalog/skills/gistui/SKILL.md and add GistUI to this app.
SKILL.md has the steps for every framework, the Vercel AI SDK, tools, forms and theming;
reference.md next to it is the language itself, generated from the catalog.
streamText works as it is: pass GistUI's prompt as system, and return toTextStreamResponse()
for <GistUI stream> or toUIMessageStreamResponse() for useChat and @gistui/chat's aiSdk() adapter.
import { prompt } from "@gistui/catalog";
import { convertToModelMessages, streamText } from "ai";
const result = streamText({ model, system: prompt().text, messages: await convertToModelMessages(messages) });
return result.toTextStreamResponse();| Package | What it is |
|---|---|
@gistui/react |
React renderer and default components |
@gistui/vue |
Vue 3.5+ and Nuxt |
@gistui/svelte |
Svelte 5 and SvelteKit |
@gistui/solid |
Solid and SolidStart |
@gistui/vanilla |
Vanilla JavaScript renderer, no framework (the base of Vue, Svelte and Solid) |
@gistui/catalog |
The default components' schemas and the system prompt |
@gistui/styles |
One stylesheet for every framework |
@gistui/server |
Stream reading, validation and repair on the server |
@gistui/chat |
Headless chat store, model adapters, React chat layouts |
@gistui/core |
The language: streaming parser, validator, autofix, prompt generator |
@gistui/headless, @gistui/widgets |
Shared internals: engine, themes, charts, Markdown |
Examples are in examples/ (Vue, Svelte, Solid, React with shadcn/ui), and the playground is in apps/playground.
Measured against OpenUI. The full results, the method and how to run them yourself are on
gistui.com/benchmarks and in benchmark.md.
| OpenUI | GistUI | |
|---|---|---|
| Main-thread time to render a streaming dashboard in Chrome | 2,204 ms | 492 ms |
| Valid answers as the model wrote them (gpt-oss-120b, 182 answers) | 84.6% | 87.9% |
| Valid after repair | a second model call in OpenUI Cloud, not measured | 100%, in code, no model call |
| Tokens per screen, system prompt + answer | 5,618 | 4,461 |
| First-load JavaScript, default components, gzip | 699 KB | 74 KB |
- Rendering: 2–6× less main-thread work across OpenUI's own sample screens, in the same page, at the same streaming pace.
- Model test: OpenUI's benchmark (46 screens × 4 runs), same catalog, examples and settings for both. With the small gpt-5-nano, both are 22–23% valid as written; GistUI's repair takes it to 99.5%.
bun install
bun run build && bun run typecheck && bun run test
bun run test:visual # screenshots of every example
bun run test:parity # React, vanilla, Vue, Svelte and Solid render the same pixels
bun run test:shadcn # shadcn/ui components behave like the built-in ones
bun run size # bundle size gatesPull requests are disabled. Coding agents make it too easy to send a large, low-context change that costs maintainers more time than it saves. Thoughtful contributions are welcome; please understand the code, keep the patch focused, and respect the review time you are asking for.
Issues are open: report a bug, ask a question or propose a change there. If a change is worth making, we will work out together how it gets in.