Skip to content

Commit 67dae08

Browse files
authored
fix: changed order of sections in OpenUI Lang intro page (#457)
Move "Architecture at a Glance" above the "OpenUI Lang" section so readers see the high-level flow before diving into language details.
1 parent 9441dad commit 67dae08

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

docs/content/docs/openui-lang/index.mdx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@ Most AI applications are limited to returning text (as markdown) or rendering pr
1414
Generative UI fundamentally changes this relationship. Instead of merely providing content, the AI composes the interface itself. It dynamically selects, configures, and composes components from a predefined library to create a purpose-built interface tailored to the user's immediate request, be it an interactive chart, a complex form, or a multi-tab dashboard.
1515

1616
<TryItOut />
17+
18+
## Architecture at a Glance
19+
20+
<img src="/images/openui-lang/openui-chart-flow.png" alt="Architecture diagram" />
21+
22+
1. **System prompt includes OpenUI Lang spec**: Your backend appends the generated component library prompt alongside your system prompt, instructing the LLM to respond in OpenUI Lang instead of plain text or JSON.
23+
24+
2. **LLM generates OpenUI Lang**: Instead of returning markdown, the model outputs a compact, line-oriented syntax (e.g., `root = Stack([chart])`) constrained to your component library.
25+
26+
3. **Streaming render**: On the client, the `<Renderer />` component parses each line as it arrives and maps it to your React components in real-time. Structure renders first, then data fills in progressively.
27+
28+
The result is a native UI dynamically composed by the AI, streamed efficiently, and rendered safely from your own components. For data-driven apps with live tools and reactive state, see [Architecture](/docs/openui-lang/how-it-works).
29+
30+
31+
32+
1733
## OpenUI Lang
1834

1935
OpenUI Lang is a compact, line-oriented language designed specifically for Large Language Models (LLMs) to generate user interfaces. It serves as a more efficient, predictable, and stream-friendly alternative to verbose formats like JSON. For the complete syntax reference, see the [Language Specification](/docs/openui-lang/specification-v05).
@@ -32,18 +48,6 @@ OpenUI Lang was created to solve these core issues:
3248

3349
<StreamingComparison />
3450

35-
## Architecture at a Glance
36-
37-
<img src="/images/openui-lang/openui-chart-flow.png" alt="Architecture diagram" />
38-
39-
1. **System prompt includes OpenUI Lang spec**: Your backend appends the generated component library prompt alongside your system prompt, instructing the LLM to respond in OpenUI Lang instead of plain text or JSON.
40-
41-
2. **LLM generates OpenUI Lang**: Instead of returning markdown, the model outputs a compact, line-oriented syntax (e.g., `root = Stack([chart])`) constrained to your component library.
42-
43-
3. **Streaming render**: On the client, the `<Renderer />` component parses each line as it arrives and maps it to your React components in real-time. Structure renders first, then data fills in progressively.
44-
45-
The result is a native UI dynamically composed by the AI, streamed efficiently, and rendered safely from your own components. For data-driven apps with live tools and reactive state, see [Architecture](/docs/openui-lang/how-it-works).
46-
4751
## What can you build?
4852

4953
<Cards>
@@ -57,3 +61,4 @@ The result is a native UI dynamically composed by the AI, streamed efficiently,
5761
</Cards>
5862

5963
Want to try it? [Open the Playground](/playground) or follow the [Quick Start](/docs/openui-lang/quickstart).
64+

0 commit comments

Comments
 (0)