Streamdown: a React library that replaces react-markdown with proper streaming support for AI applications.
Key features:
π Handles incomplete Markdown blocks during streaming
π¨ Styles unterminated bold, italic, and code elements properly
π Full GitHub Flavored Markdown support with tables and task lists
π’ Built-in LaTeX math rendering with KaTeX
π― Syntax highlighting with Shiki and copy buttons
π‘οΈ Security hardening for untrusted content
β‘ Memoized rendering for better performance
Works as a drop-in replacement with the same API as react-markdown but actually handles streaming content properly.
The unterminated block parsing is particularly useful for AI chat applications where content arrives progressively.
π Blog Post
π GitHub Repo
π Live Demo
Top comments (0)