Skip to content

Conversation

@haydenbleasel
Copy link

@haydenbleasel haydenbleasel commented Nov 23, 2025

Howdy!

This PR migrates the Markdown component from react-markdown (plus plugins) to Streamdown, a modern markdown renderer purpose-built for AI streaming applications we're building at Vercel. We're using it on a few projects like ChatSDK and thought you might enjoy it too.

Benefits

  • Built for AI streaming - Handles incomplete markdown gracefully during real-time content generation
  • Fewer dependencies - Replaces 5 packages (react-markdown, rehype-highlight, rehype-raw, rehype-sanitize, remark-gfm) with 1
  • Better out-of-box experience - Built-in Tailwind typography, syntax highlighting, and GFM support
  • Enhanced security - Native protection against malicious markdown and prompt injection
  • CJK language support - Proper emphasis rendering for Chinese, Japanese, and Korean
  • Performance optimized - Lots of effort gone in to memoization, LRU caches, etc. to make the fastest and most performant markdown streaming experience.
  • Interactive code blocks and tables - Users can download and copy tables / code block data
  • Mermaid support - built in support for Mermaid diagrams

I also updated your docs to cover this.

Hope this is a helpful PR, would love to hear your thoughts regardless.

@vercel
Copy link
Contributor

vercel bot commented Nov 23, 2025

@haydenbleasel is attempting to deploy a commit to the julienthibeaut's projects Team on Vercel.

A member of the Team first needs to authorize it.

@haydenbleasel haydenbleasel changed the title Migrate to Streamdown Migrate Markdown component's React Markdown to Streamdown Nov 23, 2025
@ibelick
Copy link
Owner

ibelick commented Dec 11, 2025

hey, thanks for the PR!
I'd prefer to keep the option with react-markdown for now, but we can add a new components that wraps streamdown.
If you want to add it, i'll be happy to review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants