Customization
ConfigurationStylingComponentsPlugins
Built-in Plugins@streamdown/code@streamdown/mermaid@streamdown/math@streamdown/cjkFeatures
AnimationCaretsCode BlocksGitHub Flavored MarkdownInteractivityLink SafetyMemoizationSecurityUnterminated Block ParsingTypographyA markdown renderer designed for streaming content from AI models. Highly interactive, customizable, and easy to use.
Built-in typography, streaming carets, animations, plugins, and more.
Powering AI experiences for
Built-in Tailwind typography for headings, lists, and code blocks. GitHub Flavored Markdown adds tables, task lists, strikethrough, and autolinks.
Built-in caret indicators show users content is generating. Unterminated block styling parses incomplete Markdown for prettier streaming with smooth animations.
Shiki-powered syntax highlighting with copy and download buttons. Supports language detection and line numbers.
LaTeX math through KaTeX, interactive Mermaid diagrams with fullscreen viewing, and CJK support for correct ideographic punctuation.
Security hardening blocks images and links from unexpected origins. Link safety modals display the full URL before navigation to protect users.
Override any element with custom components, apply your own styles, and fine-tune behavior through configuration. Tree-shakeable plugins keep your bundle lean.
Install only what you need. Plugins are optional and tree-shakeable for minimal bundle size.
import { useChat } from "@ai-sdk/react";import { Streamdown } from "streamdown";import { code } from "@streamdown/code";import { mermaid } from "@streamdown/mermaid";import { math } from "@streamdown/math";import { cjk } from "@streamdown/cjk";import "katex/dist/katex.min.css";
export default function Chat() { const { messages, status } = useChat();
return ( <div> {messages.map(message => ( <div key={message.id}> {message.role === 'user' ? 'User: ' : 'AI: '} {message.parts.map((part, index) => part.type === 'text' ? ( <Streamdown key={index} plugins={{ code, mermaid, math, cjk }} isAnimating={status === 'streaming'} > {part.text} </Streamdown> ) : null, )} </div> ))} </div> );}See Streamdown in action with one of our templates.