mdocUI logo

Generative UI for LLMs

LLMs write markdown and drop interactive UI components in the same stream — charts, buttons, forms, tables, cards. No custom DSL, no JSON blocks.

pnpm add @mdocui/core @mdocui/react
GitHub starsnpm version

What the LLM writes

mdocUI Markup
1{% card title="Key Metrics" %}
2 {% grid cols=3 %}
3 {% stat label="Revenue" value="$12,482" /%}
4 {% stat label="Orders" value="284" /%}
5 {% stat label="Avg Order" value="$43.95" /%}
6 {% /grid %}
7{% /card %}

Markdoc syntax, zero friction

The LLM streams plain text with {% tag %} delimiters. The streaming parser tokenizes each chunk as it arrives and renders live UI components — stats, charts, tables, forms — inline with prose.

No JSON schema negotiation. No tool calls. No post-processing. The model just writes, and users see rich interactive UI appear character by character.

Built for real-time AI interfaces

24 Components

Layout, interactive, data, and content components out of the box.

Streaming Parser

Character-by-character tokenizer handles partial chunks in real-time.

Zero Config Prose

Built-in markdown rendering. No react-markdown dependency needed.

CLI Scaffolder

`npx mdocui init` detects your framework and generates everything.

Error Boundaries

One broken component won't crash your chat. Graceful per-component recovery.

Theme Neutral

Components use currentColor/inherit. Your theme, your rules.

Packages

@mdocui/core

Streaming parser, registry, prompt generator

@mdocui/core version@mdocui/core downloadsAvailable

@mdocui/react

24 components, Renderer, useRenderer hook

@mdocui/react version@mdocui/react downloadsAvailable

@mdocui/cli

Scaffold, generate, preview

@mdocui/cli version@mdocui/cli downloadsAvailable

@mdocui/vue

Vue renderer

Coming Soon

@mdocui/svelte

Svelte renderer

Coming Soon

Write mdocUI markup and see it render live

Roadmap

Available

@mdocui/core

Streaming parser, registry, prompt generator

Available

@mdocui/react

24 components, Renderer, useRenderer hook

Coming Soon

@mdocui/vue

Vue renderer with the same 24 components

Coming Soon

@mdocui/svelte

Svelte renderer

Planned

VS Code Extension

Syntax highlighting and autocomplete for {% %} tags

Planned

v1.0.0

Stable API, frozen component props, CHANGELOG