MDFlow is a lightweight, high-performance Markdown-to-React converter designed to render Markdown text or files directly into your React application with zero heavy dependencies.
Unlike many existing NPM Markdown packages that rely on deprecated modules or complex abstract syntax tree (AST) parsers, MDFlow is built from the ground up. It offers a clean, customizable UI out of the box using standard CSS-in-JS and Tailwind-friendly structures, giving you full control over how your content looks without the bloat.
- Zero Bloated Dependencies: Most converters are a "black box" of deprecated nested modules. MDFlow is lean and modern.
- Native React Support: Renders actual React components, not just a raw HTML string (though a string parser is included).
- Built-in File Fetching: Simply pass a
.mdfile path, and MDFlow handles the fetch and error states for you. - Deep Customization: Control everything from table curves and heading colors to media behavior via a simple
themeobject. - Video Support: Automatically detects and renders
.mp4and.webmlinks as playable video players.
npm install mdflow
yarn add mdflow
import { MDFlow } from 'mdflow';
function App() {
return (
<MDFlow text="# Hello World\nThis is **MDFlow**." />
);
}
import { MDFlow } from 'mdflow';
function App() {
return (
<MDFlow
file="/docs/guide.md"
width="70%"
align="center"
/>
);
}
| Attribute | Type | Description |
|---|---|---|
text |
string |
Raw markdown string to render. |
file |
string |
URL or local path to a .md file. |
width |
string |
Width of the container (e.g., "100%", "600px"). |
align |
`"left" | "center" |
theme |
object |
Customize colors, fonts, and spacing. |
errorToShow |
string |
Custom error message if file fetching fails. |
containerStyle |
object |
Custom padding/margin for the wrapper. |
Give your markdown a "Dark Mode" or brand-specific look.
<MDFlow
text="# Dark Mode Header"
theme={{
headingColor: "#60a5fa",
backgroundColor: "#1e1e1e",
fontFamily: "monospace",
tableCurve: "12px",
linkColor: "#fbbf24"
}}
/>
Provide a custom UI if the markdown file isn't found.
<MDFlow
file="/missing-file.md"
errorToShow="Oops! This document has moved."
errorFileNotFound={<MyCustomErrorComponent />}
/>
Perfect for blog-style layouts where you want a centered readable column.
<MDFlow
file="/blog/post-1.md"
width="60%"
align="center"
containerStyle={{ padding: "40px" }}
theme={{ showFileEnlarged: true }}
/>
- First Sample Video
- View Example Code:

- Readme Code: Original Readme
- My Implementation: GitHub Issues