Markdown Preview
Rendered Markdown. Pro · AI chat and agents › Chat
Installation
npx valyro-cli@latest login
npx valyro-cli@latest add markdown-preview
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { MarkdownPreview } from 'valyro-ui-pro';
Props
| Prop | Type | Default | |
|---|---|---|---|
content * | string | Markdown source. Rendered through a parser to React elements — raw HTML is shown as text. | |
remoteImages | boolean | false | Load images from other origins. Off by default: in AI output an image URL can leak conversation data the moment it loads, so remote images render as links instead. |
streaming | boolean | false | Text is still arriving: a caret follows the last block, code blocks included. |
renderCitation | (index: number) => ReactNode | Turns [1]-style markers in the text into nodes, e.g. Citation chips. Markers inside links and code stay text, and so does a marker the function returns null for. | |
labels | Partial<MarkdownPreviewLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Related components
- AI Chat Window — AI chat window
- Chat Message — Messages with streaming output
- Message Branches — Message versions and a conversation branch tree
- Streaming Text — Smooth token streaming
- Response Feedback — Answer rating and a rubric for reviewers
- Prompt Composer — Prompt field with attachments
- Inline Suggestion — Inline autocomplete suggestion
- Model Selector — AI model picker
- Model Comparison — Side-by-side answers from several models
- Prompt Library — Prompt library with variables
- Chain of Thought — Model reasoning steps
- Tool Call — Tool call with approval
Previous: Streaming Text · Next: Response Feedback · All AI chat and agents