ValyroUI Русская версия

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

PropTypeDefault
content *stringMarkdown source. Rendered through a parser to React elements — raw HTML is shown as text.
remoteImagesbooleanfalseLoad 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.
streamingbooleanfalseText is still arriving: a caret follows the last block, code blocks included.
renderCitation(index: number) => ReactNodeTurns [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.
labelsPartial<MarkdownPreviewLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Streaming Text · Next: Response Feedback · All AI chat and agents