Vercel

Streamdown v2.5 Adds KaTeX Support and Animation for AI-Powered Apps


Executive Summary

Streamdown, a React component library for rendering real-time streaming markdown, has released version 2.5. This update is aimed at developers building AI applications and introduces significant enhancements, including inline KaTeX support for mathematical formulas, configurable staggered text animations, and numerous improvements to code block rendering. The release also addresses several bugs, including better CSV export compatibility and fixes for Tailwind CSS v3.

Key Takeaways

* Inline KaTeX Support: A new `inlineKatex` option allows for the rendering of mathematical formulas streamed in real-time.

* Staggered Streaming Animations: Text animations can now cascade sequentially with a configurable `stagger` option, improving the visual effect of streaming content.

* Code Block Enhancements: Custom renderers now receive raw metastring data, line numbers can be disabled, long lines scroll horizontally instead of clipping, and unknown language identifiers fall back gracefully to plain text.

* Parser Improvements: The streaming parser now correctly handles single tildes (`~`) to prevent accidental strikethroughs and fixes KaTeX block completion.

* Bug Fixes: The `save()` function now prepends a UTF-8 BOM to CSV exports for better Excel compatibility on Windows, and caret rendering in Tailwind CSS v3 has been fixed.

Strategic Importance

This update solidifies Streamdown's utility for developers creating sophisticated AI chat and content generation interfaces, offering greater control over visual presentation and robustness in handling complex, real-time data streams.

Original article