---
name: streamdown
description: "A headless React renderer for LLM markdown: caches finished blocks, reveals text smoothly, completes half-typed syntax. Use when choosing a component, looking up its props and API, or implementing UI with it."
---

# Streamdown

> A headless React renderer for LLM markdown: caches finished blocks, reveals text smoothly, completes half-typed syntax.

## Setup

- Package: `@lobehub/streamdown`
- Repository: https://github.com/lobehub/streamdown
- Docs: https://streamdown.lobehub.com/

## Workflow

1. Pick candidates from the index below. Groups follow the source folder, which usually maps to the import entry.
2. Fetch the linked reference page before writing code. It holds the documented usage, props and API tables.
3. Only use props, variants and imports that the reference page documents. Follow its Docs link to see live demos.

The page index with outlines is at https://streamdown.lobehub.com/llms.txt.

## Index

### Guides

- [Code Fences](https://streamdown.lobehub.com/skills/content/code-fences.md) — Render open and closed code fences while streaming, plug in your own highlighter and diagrams, and detect an open fence.
- [Incomplete Markdown](https://streamdown.lobehub.com/skills/features/incomplete-markdown.md) — How Streamdown completes unclosed markdown on the open tail with remend, so partial emphasis, links and code render formatted.
- [Introduction](https://streamdown.lobehub.com/skills/guide/introduction.md) — Why markdown streamed from an LLM trips up ordinary renderers, and how Streamdown keeps it readable while it arrives.
- [Block Memoization](https://streamdown.lobehub.com/skills/features/blocks.md) — How Streamdown splits streaming markdown into top-level blocks, freezes finished ones and re-renders only the open tail.
- [Getting Started](https://streamdown.lobehub.com/skills/guide/getting-started.md) — Install @lobehub/streamdown, render your first streaming message, then add GFM tables and math.
- [LaTeX](https://streamdown.lobehub.com/skills/content/latex.md) — Render math while it streams with remark-math and rehype-katex, hold incomplete formulas with latexGuard, and clean model output with prepr…
- [Components & Plugins](https://streamdown.lobehub.com/skills/content/components.md) — Style Streamdown's headless output, swap elements through react-markdown components, and add GFM, math, highlighting or diagrams with plugi…
- [Smooth Reveal](https://streamdown.lobehub.com/skills/features/smooth-reveal.md) — The smoothing presets that turn bursty LLM chunks into a steady per-character reveal, and the hook behind them.
- [Usage](https://streamdown.lobehub.com/skills/guide/usage.md) — Feed Streamdown from any token stream, use it with the AI SDK, and move over from react-markdown.
- [Animation](https://streamdown.lobehub.com/skills/features/animation.md) — How Streamdown fades newly revealed text in per character or per word with CSS, and how to style or disable it.

### src

- [Streamdown](https://streamdown.lobehub.com/skills/components/streamdown.md) — Streamdown renders partial markdown from an LLM stream with block caching, smooth per-character reveal and a LaTeX guard.
- [Streamdown Profiler](https://streamdown.lobehub.com/skills/components/profiler.md) — Measure Streamdown's root and block commit cost, reveal frames and input chunks with createStreamdownProfiler and StreamdownProfilerProvide…

