Docs / components / MarkdownRenderer

MarkdownRenderer

component

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

ParamTypeNotesDescription
contentstringrequiredRaw markdown from message.content.
isStreamingbooleanPass true while streaming to apply mid-stream table repair.
classNamestringCustom 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.