Skip to content
Dashboard

Streamdown v2: Smaller bundle size and new Remend options

DX Engineer
OG card image for Streamdown v2
now availableOG card image for Streamdown v2
now available

Link to headingStreamdown Plugins

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 styles for math rendering
import 'katex/dist/katex.min.css';
export default function Page() {
const markdown = `# Hello, world`;
return (
<Streamdown plugins={{ code, mermaid, math, cjk }}>
{markdown}
</Streamdown>
);
}

Link to headingCarets

Link to headingConfigurable Remend

import { Streamdown } from "streamdown";​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​‌‍‌‍‌‌‌‌‍​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‌‌​​‌​​​‍‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​‌‍‌‍‌‌‌‌‍​​‍‍‌‍​‌‍‌‍‌​‍‌​‌​​‌‍​‌‌‍​‌‍‌‌‌​​‍‌‍‌‌​‌‌​​​‍​​​‍‌‍‍​‌‍​‌‌​​‌​‌​‌​‌‍‍‌​‍‌‍‌‌‌‍‍‌‌‍‌‍‍‌‌​‍‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌​‌​​‍‌‍‌‌‍​‌‌​‌‌​‌‍‌‌‌​‍​‍‌‍‌‌‌‍‍‌‌​‌​‍‌‍‍‌‌‍‌‌‌​​‍​‌​‌​‌‌‍‍​‌‌‍​‍‌​‌‍‌‍​‌‌‍‍‌‌​‍‌​‌​​​​‌‌‌‍​‌‍‌‌‌‍​‌‌‍​‌‌‍​‌‍‌‍​‌‍‌‌​‍​‌‍‌‍‌‍‌‍​‌‌‌‌​‌‍‌‌‌‍‌​‌​‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​​‌‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‍‌‍‌‍‌‍‌‍​‌‌‌‌​‌‍‌‌‌‍‌​‌​​‌‍‌‍​‌‍​‌‌‍​‌‍‌‌​‌‌‍‌‌‌‍‍​‍‌‌‌‌‌‌‌​​‍‌‍‌​‌‍‌‌‌‌​‍‌‍​‌‍‌‌​‌‌‌‍‌‍‌‌‌​‍‌‍​‌‍‌‌‌‍​​‍‌‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‌‍​‌‍‍‌‌‍‍‌‍‍​‍​‍​‍​​‍​‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​‌‍‌‍‌‌‌‌‍​​‍​‍​‍‍‌‍​‍​‍‌​‌​​‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍​‍​‍‌‍‌‌​‌‌​​​‍​​​‍‌‍‍​‌‍​‌‌​​‌​‌​‌​‌‍‍‌​‍​‍​‍​​‍​‍‌‍‌‌‌‍‍‌‌‍‌‍‍‌‌​‍‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌​​‍​‍​‍‍​‍​‍‌‍‌‌‍​‌‌​‌‌​‌‍‌‌‌​‍​‍​‍​‍​​‍​‍‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​​‍​‍​‍‍​‍​‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍​‍​‍​​‍​‍‌‍​‌‍‌‍​‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍​‍​‍‌‍‌‌‌‍‍​‍‌‌‌‌‌‌‌​​‍​‍​‍​​‍​‍‌‍‌‌‌‍‍‌‌​‌‍‍‌‌‌​‌‍‌​‍​‍​‍‍​‍​‍​‌​‌​‌‌‍‍​‌‌‍​‍‌​‌‍‌‍​‌‌‍‍‌‌​‍‌​‌​​​​‌‌‌‍​‌‍‌‌‌‍​‌‌‍​‌‌‍​‌‍‌‍​‌‍‌‌​‍​‍​‍​​‍​‍‌‍‌‌‌‍‍‌‌​‌‍‍‌‌‌​‌‍‌‌‌‌​‌‍‌‌​​‌‍‌‌​‍​‍​‍‍​‍​‍‌​‌‌‌‍‍‌‌​‌​‍‌‍‌​‍​‍​‍​​‍​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍‌​‍‌‌‍‍‌‌​‌‍‌‌‌​‍‌‍‌‍‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍‌‍​‍​‍‌‌‌‍‍‌‌‍‌​‌‍‌‌‍‌‌‌‌​‌​‍‌‌‍‌​​‍​‍​‍‍​‍​‍‌​‍‌‍‍‌‌‍​‌‍‍​‌‌‌​‌‍‌‌‌‍​‌‌​‌​‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍​‍​‍​​‍​‍‌‌‌‍‍‌‌‍‌​‌‍‌‌‍‌‌‌‌​‌​‍‌‍​‌‌‍‌‌‍‌‌‌​‌​​‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍​‍​‍‌‍​‍‌‌‌‌‍‍‌‌‍​‌‌​‌‍‍‌‌‍‍​‍​‍‌‌​‍​​‍​‍‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌‌​‌‍‌‌​​‌‍‌‌​‍​‍​‍‍​‍​‍‌‌​‍‌‍‍‌‌‍​‌‍‍​‌‌‌​‌‍‌‌‌‍​‌‌​​‍​‍‌‌‌‌
const markdown = "# Hello world!";​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​‌‍‌‍‌‌‌‌‍​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‌‌​​‌​​​‍‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​‌‍‌‍‌‌‌‌‍​​‍‍‌‍​‌‍‌‍‌​‍‌​‌​​‌‍​‌‌‍​‌‍‌‌‌​​‍‌‍‌‌​‌‌​​​‍​​​‍‌‍‍​‌‍​‌‌​​‌​‌​‌​‌‍‍‌​‍‌‍‌‌‌‍‍‌‌‍‌‍‍‌‌​‍‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌​‌​​‍‌‍‌‌‍​‌‌​‌‌​‌‍‌‌‌​‍​‍‌‍‌‌‌‍‍‌‌​‌​‍‌‍‍‌‌‍‌‌‌​​‍​‌​‌​‌‌‍‍​‌‌‍​‍‌​‌‍‌‍​‌‌‍‍‌‌​‍‌​‌​​​​‌‌‌‍​‌‍‌‌‌‍​‌‌‍​‌‌‍​‌‍‌‍​‌‍‌‌​‍​‌‍‌‍‌‍‌‍​‌‌‌‌​‌‍‌‌‌‍‌​‌​‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​​‌‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‍‌‍‌‍‌‍‌‍​‌‌‌‌​‌‍‌‌‌‍‌​‌​​‌‍‌‍​‌‍​‌‌‍​‌‍‌‌​‌‌‍‌‌‌‍‍​‍‌‌‌‌‌‌‌​​‍‌‍‌​‌‍‌‌‌‌​‍‌‍​‌‍‌‌​‌‌‌‍‌‍‌‌‌​‍‌‍​‌‍‌‌‌‍​​‍‌‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‌‍​‌‍‍‌‌‍‍‌‍‍​‍​‍​‍​​‍​‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​‌‍‌‍‌‌‌‌‍​​‍​‍​‍‍‌‍​‍​‍‌​‌​​‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍​‍​‍‌‍‌‌​‌‌​​​‍​​​‍‌‍‍​‌‍​‌‌​​‌​‌​‌​‌‍‍‌​‍​‍​‍​​‍​‍‌‍‌‌‌‍‍‌‌‍‌‍‍‌‌​‍‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌​​‍​‍​‍‍​‍​‍‌‍‌‌‍​‌‌​‌‌​‌‍‌‌‌​‍​‍​‍​‍​​‍​‍‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​​‍​‍​‍‍​‍​‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍​‍​‍​​‍​‍‌‍​‌‍‌‍​‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍​‍​‍‌‍‌‌‌‍‍​‍‌‌‌‌‌‌‌​​‍​‍​‍​​‍​‍‌‍‌‌‌‍‍‌‌​‌‍‍‌‌‌​‌‍‌​‍​‍​‍‍​‍​‍​‌​‌​‌‌‍‍​‌‌‍​‍‌​‌‍‌‍​‌‌‍‍‌‌​‍‌​‌​​​​‌‌‌‍​‌‍‌‌‌‍​‌‌‍​‌‌‍​‌‍‌‍​‌‍‌‌​‍​‍​‍​​‍​‍‌‍‌‌‌‍‍‌‌​‌‍‍‌‌‌​‌‍‌‌‌‌​‌‍‌‌​​‌‍‌‌​‍​‍​‍‍​‍​‍‌​‌‌‌‍‍‌‌​‌​‍‌‍‌​‍​‍​‍​​‍​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍‌​‍‌‌‍‍‌‌​‌‍‌‌‌​‍‌‍‌‍‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍‌‍​‍​‍‌‌‌‍‍‌‌‍‌​‌‍‌‌‍‌‌‌‌​‌​‍‌‌‍‌​​‍​‍​‍‍​‍​‍‌​‍‌‍‍‌‌‍​‌‍‍​‌‌‌​‌‍‌‌‌‍​‌‌​‌​‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍​‍​‍​​‍​‍‌‌‌‍‍‌‌‍‌​‌‍‌‌‍‌‌‌‌​‌​‍‌‍​‌‌‍‌‌‍‌‌‌​‌​​‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍​‍​‍‌‍​‍‌‌‌‌‍‍‌‌‍​‌‌​‌‍‍‌‌‍‍​‍​‍‌‌​‍​​‍​‍‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌‌​‌‍‌‌​​‌‍‌‌​‍​‍​‍‍​‍​‍‌‌​‍‌‍‍‌‌‍​‌‍‍​‌‌‌​‌‍‌‌‌‍​‌‌​​‍​‍‌‌‌‌
return (
<Streamdown remend={{
links: true, // Complete links and images
images: true, // Complete images
bold: true, // Complete bold formatting
italic: true, // Complete italic formatting
boldItalic: true, // Complete bold-italic formatting
inlineCode: true, // Complete inline code formatting
strikethrough: true, // Complete strikethrough formatting
katex: true, // Complete block KaTeX math
setextHeadings: true, // Handle incomplete setext headings
}}>{markdown}</Streamdown>
);​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​‌‍‌‍‌‌‌‌‍​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‌‌​​‌​​​‍‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​‌‍‌‍‌‌‌‌‍​​‍‍‌‍​‌‍‌‍‌​‍‌​‌​​‌‍​‌‌‍​‌‍‌‌‌​​‍‌‍‌‌​‌‌​​​‍​​​‍‌‍‍​‌‍​‌‌​​‌​‌​‌​‌‍‍‌​‍‌‍‌‌‌‍‍‌‌‍‌‍‍‌‌​‍‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌​‌​​‍‌‍‌‌‍​‌‌​‌‌​‌‍‌‌‌​‍​‍‌‍‌‌‌‍‍‌‌​‌​‍‌‍‍‌‌‍‌‌‌​​‍​‌​‌​‌‌‍‍​‌‌‍​‍‌​‌‍‌‍​‌‌‍‍‌‌​‍‌​‌​​​​‌‌‌‍​‌‍‌‌‌‍​‌‌‍​‌‌‍​‌‍‌‍​‌‍‌‌​‍​‌‍‌‍‌‍‌‍​‌‌‌‌​‌‍‌‌‌‍‌​‌​‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​​‌‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‍‌‍‌‍‌‍‌‍​‌‌‌‌​‌‍‌‌‌‍‌​‌​​‌‍‌‍​‌‍​‌‌‍​‌‍‌‌​‌‌‍‌‌‌‍‍​‍‌‌‌‌‌‌‌​​‍‌‍‌​‌‍‌‌‌‌​‍‌‍​‌‍‌‌​‌‌‌‍‌‍‌‌‌​‍‌‍​‌‍‌‌‌‍​​‍‌‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‌‍​‌‍‍‌‌‍‍‌‍‍​‍​‍​‍​​‍​‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​‌‍‌‍‌‌‌‌‍​​‍​‍​‍‍‌‍​‍​‍‌​‌​​‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍​‍​‍‌‍‌‌​‌‌​​​‍​​​‍‌‍‍​‌‍​‌‌​​‌​‌​‌​‌‍‍‌​‍​‍​‍​​‍​‍‌‍‌‌‌‍‍‌‌‍‌‍‍‌‌​‍‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌​​‍​‍​‍‍​‍​‍‌‍‌‌‍​‌‌​‌‌​‌‍‌‌‌​‍​‍​‍​‍​​‍​‍‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​​‍​‍​‍‍​‍​‍‌‍​‌‍‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍​‍​‍​​‍​‍‌‍​‌‍‌‍​‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍​‍​‍‌‍‌‌‌‍‍​‍‌‌‌‌‌‌‌​​‍​‍​‍​​‍​‍‌‍‌‌‌‍‍‌‌​‌‍‍‌‌‌​‌‍‌​‍​‍​‍‍​‍​‍​‌​‌​‌‌‍‍​‌‌‍​‍‌​‌‍‌‍​‌‌‍‍‌‌​‍‌​‌​​​​‌‌‌‍​‌‍‌‌‌‍​‌‌‍​‌‌‍​‌‍‌‍​‌‍‌‌​‍​‍​‍​​‍​‍‌‍‌‌‌‍‍‌‌​‌‍‍‌‌‌​‌‍‌‌‌‌​‌‍‌‌​​‌‍‌‌​‍​‍​‍‍​‍​‍‌​‌‌‌‍‍‌‌​‌​‍‌‍‌​‍​‍​‍​​‍​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍‌​‍‌‌‍‍‌‌​‌‍‌‌‌​‍‌‍‌‍‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍‌‍​‍​‍‌‌‌‍‍‌‌‍‌​‌‍‌‌‍‌‌‌‌​‌​‍‌‌‍‌​​‍​‍​‍‍​‍​‍‌​‍‌‍‍‌‌‍​‌‍‍​‌‌‌​‌‍‌‌‌‍​‌‌​‌​‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍​‍​‍​​‍​‍‌‌‌‍‍‌‌‍‌​‌‍‌‌‍‌‌‌‌​‌​‍‌‍​‌‌‍‌‌‍‌‌‌​‌​​‌‍​‌‌‍​‌‍‌‌​‍​‍​‍‍​‍​‍‌‍​‍‌‌‌‌‍‍‌‌‍​‌‌​‌‍‍‌‌‍‍​‍​‍‌‌​‍​​‍​‍‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌‌​‌‍‌‌​​‌‍‌‌​‍​‍​‍‍​‍​‍‌‌​‍‌‍‍‌‌‍​‌‍‍​‌‌‌​‌‍‌‌‌‍​‌‌​​‍​‍‌‌‌‌

Ready to deploy?