MarkdownRenderer
Drop-in component for rendering agent responses with full GFM support and automatic mid-stream table repair.
import { MarkdownRenderer } from 'flowstack-sdk'Drop-in component for rendering agent responses with full GFM support (tables, code blocks, inline formatting). Handles mid-stream table repair automatically — no Tailwind or external CSS required.
Parameters
| Param | Type | Notes | Description |
|---|---|---|---|
content | string | required | Raw markdown from message.content. |
isStreaming | boolean | — | Pass true while streaming to apply mid-stream table repair. |
className | string | — | Custom class for the wrapper <div>. |
Examples
Render streaming agent responses
import { useAgent, MarkdownRenderer } from 'flowstack-sdk';
function Chat() {
const { messages, isStreaming } = useAgent('data-science');
return (
<div>
{messages.map(msg =>
msg.role === 'assistant' ? (
<MarkdownRenderer
key={msg.id}
content={msg.content}
isStreaming={isStreaming && msg === messages.at(-1)}
/>
) : (
<p key={msg.id}>{msg.content}</p>
)
)}
</div>
);
}See also
useAgent · MessageList · ChatInterface
Source: README.md#markdownrenderer · Also available in llms-full.txt and registry.json.