Streaming MarkdownPRO
Markdown that renders cleanly while it streams: headings, lists, tables and code, no raw syntax flashes.
Code
3 files · 783 lines of TypeScriptPRO
Streaming Markdown is part of Pro
Get its source, the one-paste agent prompt and all 113 components, for a one-time $99.
Motion notes
- A small, dependency-free parser built for partial input: an unclosed ``` fence is a code block that's still streaming, and a table appears as soon as its divider row arrives.
- Dangling inline markers are hidden until their partner arrives, so `**bo` reads as “bo” and becomes bold when the closing `**` lands, never as raw asterisks.
- Only the block that's still growing animates word by word; finished blocks render as plain text, so long answers stay cheap.
- Underscore emphasis needs word boundaries, so identifiers like user_id stay literal in technical answers.
Usage
Example
<StreamingMarkdown text={part.text} streaming={status === "streaming"} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | — | Markdown received so far. |
| streaming | boolean | false | Animate new words, show a caret, keep the last code block open. |
| className | string | — | Classes for the wrapper. |