MarkdownResponse
Formatted replies as they stream: headings, lists, tables, code, links and footnotes.
Used in Research answers.
- Use it for
- Formatted replies with headings, lists, tables, code and links.
- Not for
- Plain streaming text where size matters. Try StreamingResponse.
MarkdownResponse preview
Loading example…
Installation
npm install @stackunseen/ui react-markdown remark-gfm remendimport { MarkdownResponse } from '@stackunseen/ui/markdown';@stackunseen/ui/styles.cssUsage and props
Display a Markdown response as text arrives. RichMarkdownResponse also renders supported math and Mermaid fences. Pass the Markdown text from your response. From the /markdown entry. Raw HTML stays as text, and images from other sites never load on their own.
textstring- The response so far. Update it as new text arrives.
stateMessageData['state']- The response state from your application, including streaming or complete.
headingLevel1 | 2 | 3 | 4 | 5 | 6 (optional)- Heading level for a Markdown # heading. Defaults to 3; deeper headings stop at 6.
renderCodeBlock(props: MarkdownCodeBlockProps) => ReactNode (optional)- Render fenced code with your own component. Define this callback in your application.
All props
Loading…
For your coding agent
Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.
- Contract
- text · state · headingLevel? · variant · citations?: Source[]
- Keeps honest
- From the /markdown entry. Raw HTML stays as text, and images from other sites never load on their own.
- MCP
read_component "MarkdownResponse"on the docs endpoint
Keyboard and customization
Keyboard
Tab reaches links and code actions. Wide code blocks can be scrolled with the keyboard. Set headingLevel to fit the page outline.
Customization
Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio