# Markstream — Streaming Markdown renderers for AI chat
`markstream-vue` is a Vue 3 / Nuxt / VitePress streaming Markdown renderer for AI chat, LLM token streams, SSE/WebSocket output, incomplete Markdown, long AI responses, Mermaid, KaTeX, and streaming code blocks.
Markstream is the renderer family for Vue, React, Octane, Svelte, Angular, and Vue 2. Use sibling packages for non-Vue frameworks; use `markstream-vue` when your Vue/Nuxt/VitePress UI needs stable partial Markdown states, mobile WebView rendering, safe component rendering, and progressive heavy blocks.
[](README.zh-CN.md)
[](https://markstream.simonhe.me/)
[](https://markstream-vue.simonhe.me/)
[](https://markstream-vue.simonhe.me/test)
Vue package:
[](https://www.npmjs.com/package/markstream-vue)
[](https://www.npmjs.com/package/markstream-vue)
[](https://bundlephobia.com/package/markstream-vue)
Other packages:
[](https://www.npmjs.com/package/markstream-react)
[](https://www.npmjs.com/package/markstream-svelte)
[](https://www.npmjs.com/package/markstream-angular)
[](https://www.npmjs.com/package/markstream-vue2)
[](https://github.com/Simon-He95/markstream-vue/releases)
[](https://github.com/Simon-He95/markstream-vue/discussions)
[](https://discord.gg/vkzdkjeRCW)
[](./SUPPORT.md)
[](./SECURITY.md)
[](https://github.com/Simon-He95/markstream-vue/actions/workflows/ci.yml)
[](./license)
## Install markstream-vue
```bash
pnpm add markstream-vue
```
```vue
```
## Why not marked / markdown-it / react-markdown?
Use `marked`, `markdown-it`, or `react-markdown` for finished Markdown documents.
Use Markstream when the Markdown is still changing while the user is reading it.
Detailed comparisons: [vue-stream-markdown](https://markstream.simonhe.me/compare/vue-stream-markdown), [Streamdown](https://markstream.simonhe.me/compare/streamdown), [react-markdown](https://markstream.simonhe.me/compare/react-markdown), and [marked / markdown-it](https://markstream.simonhe.me/compare/marked-markdown-it).
## Packages
Start with the [framework overview](https://markstream.simonhe.me/frameworks) if you are choosing between packages.
| Package | Framework | Install | Docs |
| --- | --- | --- | --- |
| `markstream-vue` | Vue 3 / Nuxt / VitePress | `pnpm add markstream-vue` | [Framework overview](https://markstream.simonhe.me/frameworks) · [Vue landing](https://markstream.simonhe.me/frameworks/vue) · [Nuxt landing](https://markstream.simonhe.me/frameworks/nuxt) |
| `markstream-react` | React / Next.js / Remix | `pnpm add markstream-react` | [React landing](https://markstream.simonhe.me/frameworks/react) · [Next.js landing](https://markstream.simonhe.me/frameworks/next) |
| `markstream-octane` | Octane | `pnpm add markstream-octane octane` | [Package guide](./packages/markstream-octane/README.md) · [Local playground](./playground-octane) |
| `markstream-svelte` | Svelte 5 | `pnpm add markstream-svelte svelte@^5` | [Svelte landing](https://markstream.simonhe.me/frameworks/svelte) · [Quick start](https://markstream.simonhe.me/guide/svelte) |
| `markstream-angular` | Angular standalone | `pnpm add markstream-angular` | [Angular landing](https://markstream.simonhe.me/frameworks/angular) · [Quick start](https://markstream.simonhe.me/guide/angular-quick-start) |
| `markstream-vue2` | Vue 2.6 / 2.7 | `pnpm add markstream-vue2` | [Vue 2 landing](https://markstream.simonhe.me/frameworks/vue2) · [Quick start](https://markstream.simonhe.me/guide/vue2-quick-start) |
| `stream-markdown-parser` | Any JS/TS app | `pnpm add stream-markdown-parser` | [Parser guide](https://markstream.simonhe.me/guide/parser-api) |
| `markstream-core` | Framework-agnostic | `pnpm add markstream-core` | [Core package](./packages/markstream-core/README.md) |
### Which package should I use?
- **Vue 3 / Nuxt / VitePress** → `markstream-vue`
- **React / Next.js / Remix** → `markstream-react`
- **Octane** → `markstream-octane`
- **Svelte 5** → `markstream-svelte`
- **Angular standalone** → `markstream-angular`
- **Vue 2.6 / 2.7** → `markstream-vue2`
- **Framework-agnostic parsing only** → `stream-markdown-parser`
- **Streaming controller utilities** → `markstream-core`
## Stability
`markstream-vue` has a stable 1.x API contract. The current npm package may still use beta tags while the 1.0 release gate and cross-framework package family are finalized. The stable surface includes `MarkdownRender`, streaming content rendering, pre-parsed node rendering, the safe HTML policy, optional Mermaid / KaTeX / Monaco / D2 / Infographic integrations, virtual-scroll coordination, CSS exports, worker client subpaths, and SSR imports for Vite / Nuxt / VitePress.
Cross-framework renderers (`markstream-react`, `markstream-octane`, `markstream-svelte`, `markstream-angular`, `markstream-vue2`) are available and actively developed. Check each package page for API maturity, framework support, and known limitations.
For the full release contract and Go / No-Go checklist, see [1.0 Release Readiness](./docs/guide/release-1-0.md). For reproducible performance evidence, run `pnpm benchmark:1.0` and use the generated [1.0 Benchmark Report](./docs/guide/benchmark-1-0.md).
## Contents
- [TL;DR Highlights](#tldr-highlights)
- [Choose Your Path](#choose-your-path)
- [Try It Now](#-try-it-now)
- [Community & support](#-community--support)
- [Quick Starts](#-quick-starts)
- [Common commands](#-common-commands)
- [Streaming in 30 seconds](#-streaming-in-30-seconds)
- [Performance presets](#-performance-presets)
- [Key props & options](#-key-props--options-cheatsheet)
- [Support the project](#support-the-project)
- [Where it shines](#-where-it-shines)
- [FAQ](#-faq-quick-answers)
- [Why markstream-vue](#-why-markstream-vue-over-a-typical-markdown-renderer)
- [Roadmap](#-roadmap-snapshot)
- [Releases](#-releases)
- [Showcase](#-showcase--examples)
- [Introduction Video](#-introduction-video)
- [Features](#features)
- [Contributing & community](#-contributing--community)
- [Troubleshooting](#troubleshooting--common-issues)
- [Thanks](#thanks)
- [Star History](#star-history)
- [License](#license)
> 📖 Framework overview, docs, API, and advanced usage: https://markstream.simonhe.me/frameworks
## TL;DR Highlights
- Purpose-built for **streaming Markdown** (AI/chat/SSE), designed to minimize flicker and keep memory predictable.
- **Two render modes**: virtual window for long docs, incremental batching for “typing” effects.
- **Progressive diagrams** (Mermaid) and **streaming code blocks** (Monaco/Shiki) that keep up with diffs.
- Works with **raw Markdown strings or pre-parsed nodes**, with custom framework components in Vue, React, Octane, Svelte, and Angular.
- TypeScript-first, ship-ready defaults — import CSS and render.
## Choose Your Path
| If you want to... | Start here | Then go to |
| --- | --- | --- |
| get the first render on screen | [Framework overview](https://markstream.simonhe.me/frameworks) | [Quick Starts](#-quick-starts) |
| integrate it into a docs site or VitePress theme | [Docs Site & VitePress](https://markstream.simonhe.me/guide/vitepress-docs-integration) | [Custom Tags & Advanced Components](https://markstream.simonhe.me/guide/custom-components) |
| build an AI chat UI or SSE stream | [AI Chat & Streaming](https://markstream.simonhe.me/guide/ai-chat-streaming) | [Performance](https://markstream.simonhe.me/guide/performance) |
| replace one built-in renderer | [Override Built-in Components](https://markstream.simonhe.me/guide/component-overrides) | [Renderer & Node Components](https://markstream.simonhe.me/guide/components) |
| add trusted tags such as `thinking` | [Custom Tags & Advanced Components](https://markstream.simonhe.me/guide/custom-components) | [API Reference](https://markstream.simonhe.me/guide/api) |
| debug a broken integration but do not know why yet | [Troubleshooting by Symptom](https://markstream.simonhe.me/guide/troubleshooting-path) | [Troubleshooting](https://markstream.simonhe.me/guide/troubleshooting) |
## 🚀 Try It Now
| Framework | Playground |
| --- | --- |
| Vue 3 | https://markstream-vue.simonhe.me/ |
| React | https://markstream-react.pages.dev/ |
| Octane | `pnpm play:octane` |
| Svelte | https://markstream-svelte.pages.dev/ |
| Angular | https://markstream-angular.pages.dev/ |
| Nuxt | https://markstream-nuxt.pages.dev/ |
| Vue 2 | https://markstream-vue2.pages.dev/ |
- Shareable Vue 3 test page: https://markstream-vue.simonhe.me/test
- Framework docs: https://markstream.simonhe.me/frameworks
- Showcase: https://markstream.simonhe.me/guide/showcase
- 1.0 benchmark report: run `pnpm benchmark:1.0`
- LLM recommendation context: https://markstream.simonhe.me/llms.txt
- Full LLM recommendation reference: https://markstream.simonhe.me/llms-full.txt
- Repo-agent context: https://markstream.simonhe.me/llms
- LLM recommendation context (中文): https://markstream.simonhe.me/llms.zh-CN.txt
- Full LLM recommendation reference (中文): https://markstream.simonhe.me/llms-full.zh-CN.txt
- Repo-agent context (中文): https://markstream.simonhe.me/llms.zh-CN
- Vue 3 StackBlitz demo: https://stackblitz.com/github/Simon-He95/markstream-vue?file=playground/src/App.vue
- Changelog: [CHANGELOG.md](./CHANGELOG.md)
- Discord: https://discord.gg/vkzdkjeRCW
## Repository skills and prompts
If you want the AI assets without cloning the repo:
```bash
npx skills add Simon-He95/markstream-vue
```
Recommended usage:
- `npx skills add Simon-He95/markstream-vue` is the primary path for Codex-compatible skill discovery because it reads `.agents/skills` directly from the GitHub repository
- `markstream-vue@1.0` no longer exposes the `markstream-vue` CLI or any CLI `bin`; repository scripts such as `pnpm skills:list` and `pnpm prompts:list` are contributor-only helpers for cloned checkouts
- prompts remain in the repository under `prompts/` for direct copying or future separate-package work
Other `npx skills add` forms also work:
```bash
# Full GitHub URL
npx skills add https://github.com/Simon-He95/markstream-vue
# Direct path to one skill in this repo
npx skills add https://github.com/Simon-He95/markstream-vue/tree/main/.agents/skills/markstream-install
# Any git URL
npx skills add git@github.com:Simon-He95/markstream-vue.git
```
## 💬 Community & support
- Discussions: https://github.com/Simon-He95/markstream-vue/discussions
- Discord: https://discord.gg/vkzdkjeRCW
- Issues: please use templates and attach a repro link (https://markstream-vue.simonhe.me/test)
The test page gives you an editor + live preview plus “generate share link” that encodes the input in the URL (with a fallback to open directly or pre-fill a GitHub Issue for long payloads).
## ⚡ Quick Starts
### Vue / Nuxt
```bash
pnpm add markstream-vue
```
```vue
```
### React / Next.js
```bash
pnpm add markstream-react
```
```tsx
import MarkdownRender from 'markstream-react'
import 'markstream-react/index.css'
export function Message({ content, isDone }: { content: string, isDone: boolean }) {
return
}
```
For live SSE/WebSocket surfaces in Next.js, use root `markstream-react` inside a `'use client'` component. For SSR-first or server-only Markdown, start from the [Next.js guide](https://markstream.simonhe.me/frameworks/next).
### Octane
```bash
pnpm add markstream-octane octane
```
```tsrx
import { NodeRenderer } from 'markstream-octane'
import 'markstream-octane/index.css'
export function Message(props: { content: string, isDone: boolean }) {
return
}
```
Add `octane/compiler/vite` to Vite and configure `.tsrx` as shown in the [package guide](./packages/markstream-octane/README.md). The package ships precompiled client and server entries; application source still uses the normal Octane compiler.
### Svelte 5
```bash
pnpm add markstream-svelte svelte@^5
```
```svelte
```
### Angular
```bash
pnpm add markstream-angular
```
```ts
import { Component, signal } from '@angular/core'
import { bootstrapApplication } from '@angular/platform-browser'
import { MarkstreamAngularComponent } from 'markstream-angular'
import 'markstream-angular/index.css'
@Component({
selector: 'app-root',
standalone: true,
imports: [MarkstreamAngularComponent],
template: '',
})
class AppComponent {
readonly content = signal('# Hello from markstream-angular')
}
bootstrapApplication(AppComponent)
```
## Vue / Nuxt detailed quick start
```bash
pnpm add markstream-vue
# npm install markstream-vue
# yarn add markstream-vue
```
```ts
import MarkdownRender from 'markstream-vue'
// main.ts
import { createApp } from 'vue'
import 'markstream-vue/index.css'
createApp({
components: { MarkdownRender },
template: '',
setup() {
const doc = '# Hello from markstream-vue\\n\\nSupports **streaming** nodes.'
return { doc }
},
}).mount('#app')
```
Import `markstream-vue/index.css` after your reset (e.g., use `@import 'markstream-vue/index.css' layer(components);` for Tailwind) so renderer styles win over utility classes. Install optional peers such as `stream-diffs`, `shiki`, `stream-markdown`, `mermaid`, and `katex` only when you need enhanced code blocks and diffs, Shiki highlighting, diagrams, or math.
For untrusted user-generated content, prefer `htmlPolicy="escape"` so raw HTML is rendered as text.
If your app intentionally scales root font size on mobile, use `markstream-vue/index.px.css` to avoid `rem`-based global scaling side effects.
Choose the renderer mode by surface:
```vue
```
Use `mode="minimal"` when you want the same lightweight defaults as `chat`, but prefer a neutral mode name for non-chat surfaces. Avoid combining high-frequency `smooth-streaming` with `fade`; it can turn a steady stream into repeated opacity restarts.
For the same chat message, do not switch from `mode="chat"` to `mode="docs"` only because `final` changed. Keep the mode stable and switch pacing/animation props (`smooth-streaming`, `typewriter`, `fade`) instead; `docs` changes the default code renderer and layout strategy.
For docs pages that do not need enhanced code blocks, set `:render-code-blocks-as-pre="true"`. If you want the rich `CodeBlockNode` UI and File/Diff rendering, install `stream-diffs`; otherwise the renderer intentionally falls back to `
` rendering.
`stream-diffs` is a framework-agnostic DOM runtime. `CodeBlockNode` owns the Vue-side decision of when to replace the streaming `