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.
- Open the source panel.
- Change this list or add a heading.
- 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>
| Syntax | Example |
|---|---|
| Strong | A useful detail |
| Emphasis | A softer note |
| Strikethrough | |
| Inline code | const 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.