react-markdown: Markdown component for React
Render markdown as React components via unified.
Learn more about React Markdown
react-markdown is a React library that converts markdown text into React virtual DOM elements. It builds on the unified, remark, and rehype toolchain to parse markdown into an abstract syntax tree, transform it through plugins, and render it as React components. The library supports CommonMark compliance and GitHub Flavored Markdown through optional plugins, and allows developers to replace standard HTML elements with custom React components. It avoids dangerouslySetInnerHTML by constructing a virtual DOM directly from the syntax tree, enabling React's standard reconciliation and update mechanisms.
Virtual DOM Rendering
Constructs React elements directly from the markdown AST instead of using dangerouslySetInnerHTML. Enables React's standard reconciliation, diffing, and update mechanisms for safer, more performant rendering.
Component Substitution System
Replace any generated HTML element with custom React components through a simple mapping. Enables syntax highlighting, design system integration, and custom behaviors without wrapper divs or DOM manipulation.
Unified Plugin Ecosystem
Built on the unified.js ecosystem, enabling transformation pipelines with remark and rehype plugins. Add syntax highlighting, math rendering, or custom transformations by composing existing plugins or writing custom processors.
import ReactMarkdown from 'react-markdown';
const markdown = '# Hello World\n\nThis is **bold** text.';
export default function App() {
return <ReactMarkdown>{markdown}</ReactMarkdown>;
}Adds fallback prop to MarkdownHooks and fixes race condition issue.
- –Add `fallback` prop to `MarkdownHooks`
- –Fix race condition in `MarkdownHooks`
Fixes TypeScript performance issues related to component type checking.
- –Fix TypeScript performance around components
Breaking change removes support for className prop.
- –Remove support for `className` prop
Top in Frontend
Related Repositories
Discover similar tools and frameworks used by developers
React Beautiful DnD
Accessible React library for list drag-and-drop interactions.
daisyUI
Semantic component classes extending Tailwind CSS utilities.
shadcn/ui
Copy-paste React components built on Radix and Tailwind.
Tachiyomi Website
Official website for Tachiyomi manga reader with documentation and guides.
TanStack Form
Type-safe headless form state management across frameworks.
Related Reading
Guides and comparisons from the Greptile content library
27 Code Quality Tools that Catch Bugs [2026 Review]
The best code quality tools that catch bugs, security vulnerabilities, and runtime errors, sorted by language, with type, noise level, cost, and who each one is for.
Best Developer Productivity Tools in 2026
The best developer productivity tools in 2026, compared by the workflow problem they solve: code review, autocomplete, AI-native editing, terminal agents, code search, observability, and security.
Top AI Code Review Tools for Small Dev Teams 2026
Affordable, lightweight AI code review tools that help small teams catch bugs faster. Practical comparisons of accuracy, ease of use, and value for teams without enterprise budgets.
Best Security-Focused AI Code Review Tools [2026 Guide]
The six best security-focused AI code review tools, compared on SAST, SCA, DAST, and full-repo context, so you can pick the one that fits your codebase and your cycle times.