Skip to content

React Markdown Kit

Markdown in, React out. A renderer, an editor, and a few optional plugins that share the same document.

This site is built around those documents. Read a page, open its source, and change an example to see what happens.

Start with a string

npm install @react-markdown-kit/renderer
import Markdown from '@react-markdown-kit/renderer'

export function Document({ source }: { source: string }) {
  return <Markdown>{source}</Markdown>
}

No provider or stylesheet is required. The output is ordinary HTML, ready for your own components and CSS.

Explore the kit

DocumentWhat you can try
RenderingEdit the source of the documentation you're reading.
EditingWrite directly in the document and inspect the saved Markdown.
StreamingWatch this guide arrive a few words at a time.
VariablesChange the data behind a document's placeholders.
SlidesRead a deck that explains its own syntax, then present it.
MermaidDraw a diagram and keep its Mermaid source.

Add only what you need

The renderer works on its own. GitHub Flavored Markdown, rich editing, variables, diagrams, and slides are opt-in.

import Markdown, { defineMarkdownPreset, gfm } from '@react-markdown-kit/renderer'

const preset = defineMarkdownPreset({ extensions: [gfm()] })

<Markdown preset={preset}>{source}</Markdown>

Pass the same preset to the renderer and editor to keep the same Markdown features in both.

Guides

Compare and migrate

Reference

The code is open source, under the MIT license.