You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React Markdown is a comprehensive library designed to unlock the full potential of React 18 server components. It provides customizable loading animation components and a fullscreen loader container, seamlessly integrating with React and Next.js.
5
+
> ✨ A modern, JSX-compatible, SSR-ready Markdown renderer for React — with full access to MDAST & HAST trees for tools like `mdast2docx`.
6
6
7
-
✅ Fully Treeshakable (import from `@m2d/react-markdown/client/loader-container`)
7
+
---
8
8
9
-
✅ Fully TypeScript Supported
9
+
## 🔥 Why mdx-render?
10
10
11
-
✅ Leverages the power of React 18 Server components
11
+
`mdx-render` goes beyond traditional React Markdown libraries by focusing on:
12
12
13
-
✅ Compatible with all React 18 build systems/tools/frameworks
13
+
- ✅ **Server-side rendering (SSR)** without hooks
14
+
- ✅ **Full JSX children support** (not just strings)
15
+
- ✅ **Access to raw MDAST & HAST trees**
16
+
- ✅ **Drop-in plugin support** via Unified (`remark`, `rehype`, etc.)
17
+
- ✅ **Custom component overrides** per tag
18
+
- ✅ **Integration with tools like [`mdast2docx`](https://github.com/md2docx/mdast2docx)**
14
19
15
-
✅ Documented with [Typedoc](https://md2docx.github.io/react-markdown) ([Docs](https://md2docx.github.io/react-markdown))
20
+
---
16
21
17
-
✅ Examples for Next.js, and Vite
18
-
19
-
> <imgsrc="https://raw.githubusercontent.com/mayank1513/mayank1513/main/popper.png"style="height: 20px"/> Star [this repository](https://github.com/md2docx/react-markdown) and share it with your friends.
For detailed API and options, refer to [the API documentation](https://md2docx.github.io/react-markdown).
126
+
Each markdown block is processed independently to allow full JSX flexibility.
127
+
You can access all parsed trees via `astRef.current`, ideal for:
96
128
97
-
**Using LoaderContainer**
129
+
- DOCX/PDF generation (`mdast2docx`)
130
+
- Markdown linting or analytics
131
+
- AST-aware transformations
98
132
99
-
`LoaderContainer` is a fullscreen component. You can add this component directly in your layout and then use `useLoader` hook to toggle its visibility.
0 commit comments