Skip to content

React Markdown Renderer Playground

This document is rendered by React Markdown Kit. Open Source to edit it; the page updates as you type.

Render a string

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

<Markdown>{'# Hello\n\nA document, rendered as React.'}</Markdown>

The component produces ordinary HTML. There is no required provider, theme, or stylesheet.

Write familiar Markdown

Use bold, emphasis, inline code, and links. Nest lists, quote a passage, or add a code fence.

The document is the example. Change anything here in the source and watch it render.

  1. Open the source panel.
  2. Change this list or add a heading.
  3. Close the panel and read your document.

Add GitHub Flavored Markdown

This page enables GFM for tables, task lists, strikethrough, and autolinks.

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

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

<Markdown preset={preset}>{source}</Markdown>
SyntaxExample
StrongA useful detail
EmphasisA softer note
StrikethroughAn old idea
Inline codeconst ready = true
  • Render the document
  • Enable GFM
  • Make it your own

Use your own components

<Markdown components={{
  a: ({ children, ...props }) => <a {...props} className="link">{children}</a>,
}}>
  {source}
</Markdown>

Component overrides receive the element's normal props. Your application controls their styling and behavior.

Keep going

Read about components, presets, compiling a document, and security defaults. To write directly on the page, open the editor.