{
 "kind": "tool",
 "slug": "react-markdown",
 "path": "tools/react-markdown/",
 "name": "react-markdown",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Markdown, editors and content",
   "tools/content-editors/"
  ]
 ],
 "lead": "React component for rendering markdown with customizable component handling.",
 "chips": [
  {
   "label": "Markdown, editors and content",
   "path": "tools/content-editors/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install react-markdown"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/remarkjs/react-markdown"
  },
  {
   "label": "Website",
   "href": "https://github.com/remarkjs/react-markdown#readme"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/remarkjs/react-markdown"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Oct 3, 2026",
   "note": "Latest GitHub release Mar 7, 2025. ",
   "src": "https://github.com/remarkjs/react-markdown"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "248 projects",
   "status": "info",
   "sub": "#1 of 149 in its category",
   "note": "Dependency in 248 public GitHub projects set up for AI coding agents that we scanned (4.0%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What react-markdown does",
   "parts": [
    {
     "t": "prose",
     "text": "react-markdown turns a markdown string into real React elements through a syntax tree, so it never needs <code>dangerouslySetInnerHTML</code>, and you can swap any HTML element for your own component."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "react-markdown popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "83",
       "of": "/ 100",
       "l": "Gid Score, #52 overall"
      },
      {
       "n": "61.6M",
       "l": "downloads a week, npm"
      },
      {
       "n": "15.9K",
       "l": "GitHub stars"
      },
      {
       "n": "248",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How react-markdown is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "react-markdown is a dependency in 248 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (5.1% of the 4,867 JavaScript/TypeScript ones), #1 of 149 in markdown, editors and content.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,460; those are left out of every share on this page.",
      "The most used alternative in our scan is Marked (163 projects).",
      "Projects that use it most often also use React (99.2%), Lucide React (77.0%), remark-gfm (66.5%).",
      "It is more common in projects set up for Gemini CLI (7.0%) than for OpenCode (3.5%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "150 projects, 4.6%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "115 projects, 3.8%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "106 projects, 4.3%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "33 projects, 7.0%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "18 projects, 5.4%",
       "v": "OpenClaw",
       "path": "agents/openclaw/"
      },
      {
       "l": "18 projects, 3.8%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "14 projects, 5.0%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "12 projects, 3.5%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 99.2% of its projects",
       "v": "React",
       "path": "tools/react/"
      },
      {
       "l": "In 77.0% of its projects",
       "v": "Lucide React",
       "path": "tools/lucide-react/"
      },
      {
       "l": "In 66.5% of its projects",
       "v": "remark-gfm",
       "path": "tools/remark-gfm/"
      },
      {
       "l": "In 67.3% of its projects",
       "v": "Tailwind Merge",
       "path": "tools/tailwind-merge/"
      },
      {
       "l": "In 87.9% of its projects",
       "v": "Tailwind CSS",
       "path": "tools/tailwindcss/"
      },
      {
       "l": "In 66.9% of its projects",
       "v": "clsx",
       "path": "tools/clsx/"
      },
      {
       "l": "In 58.5% of its projects",
       "v": "Class Variance Authority",
       "path": "tools/class-variance-authority/"
      },
      {
       "l": "In 61.3% of its projects",
       "v": "Next.js",
       "path": "tools/next/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "react-markdown in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "No innerHTML, by design",
       "v": "The README gives three reasons to pick this over other markdown-in-React options. Others often rely on <code>dangerouslySetInnerHTML</code>, have markdown bugs, or don't let you swap elements for components. react-markdown is built to avoid all three."
      },
      {
       "l": "Your components instead of raw tags",
       "v": "A <code>components</code> prop maps tag names to your own React components. The README uses this to send code blocks to <code>react-syntax-highlighter</code>. Each component also receives the original hast <code>node</code>."
      },
      {
       "l": "Links are filtered the way GitHub does it",
       "v": "URLs go through <code>defaultUrlTransform</code> unless you pass your own <code>urlTransform</code>. The default keeps a short list of protocols and relative URLs."
      },
      {
       "l": "The whole remark and rehype plugin pool",
       "v": "Plugins go in <code>remarkPlugins</code> (markdown stage) or <code>rehypePlugins</code> (HTML stage). The README's math example pairs <code>remark-math</code> with <code>rehype-katex</code>."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "ESM only, Node 16+",
       "v": "There is no CommonJS build. The current line, <code>react-markdown@10</code>, targets Node.js 16. The README also says it works in modern browsers but not IE 11."
      },
      {
       "l": "Async plugins need a different component",
       "v": "The default <code>Markdown</code> export is synchronous. With async plugins, use <code>MarkdownAsync</code> on the server or <code>MarkdownHooks</code> on the client."
      },
      {
       "l": "MarkdownHooks renders nothing at first",
       "v": "<code>MarkdownHooks</code> relies on <code>useEffect</code> and <code>useState</code>, so output appears only after processing on the client. A <code>fallback</code> prop sets what shows in the meantime."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Render GFM (tables, tasklists, bare URLs) with remark-gfm"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Js",
       "code": "import React from 'react'\nimport {createRoot} from 'react-dom/client'\nimport Markdown from 'react-markdown'\nimport remarkGfm from 'remark-gfm'\n\nconst markdown = `Just a link: www.nasa.gov.`\n\ncreateRoot(document.body).render(\n  <Markdown remarkPlugins={[remarkGfm]}>{markdown}</Markdown>\n)"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about react-markdown",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/unifiedjs",
        "Open Collective: https://opencollective.com/unified",
        "thanks.dev: https://thanks.dev/u/gh/remarkjs",
        "25 GitHub sponsors"
       ]
      },
      {
       "title": "Head to head",
       "items": [
        {
         "text": "react-markdown vs Marked",
         "note": "used together in 31 projects",
         "path": "tools/compare/react-markdown-vs-marked/"
        },
        {
         "text": "react-markdown vs MDX",
         "note": "used together in 13 projects",
         "path": "tools/compare/react-markdown-vs-mdx/"
        }
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "lucide-react: Icon components",
        "tailwind-merge: Tailwind class merging",
        "remark-gfm: GFM plugin: tables, tasklists",
        "class-variance-authority: Component style variants",
        "tailwindcss: Utility-first CSS",
        "clsx: className builder"
       ]
      },
      {
       "title": "More in Markdown, editors and content",
       "path": "tools/content-editors/",
       "items": [
        {
         "text": "remark-gfm",
         "path": "tools/remark-gfm/"
        },
        {
         "text": "Jinja2",
         "path": "tools/jinja2/"
        },
        {
         "text": "gray-matter",
         "path": "tools/gray-matter/"
        },
        {
         "text": "Tiptap",
         "path": "tools/tiptap/"
        },
        {
         "text": "Shiki",
         "path": "tools/shiki/"
        },
        {
         "text": "highlight.js",
         "path": "tools/highlight-js/"
        },
        {
         "text": "markdown-it",
         "path": "tools/markdown-it/"
        },
        {
         "text": "Pygments",
         "path": "tools/pygments/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "react-markdown",
       "me": true,
       "facts": [
        "MIT",
        "Gid 83",
        "61.6M/wk"
       ]
      },
      {
       "name": "Marked",
       "why": "Fast, efficient markdown parser for converting markdown to HTML.",
       "path": "tools/marked/",
       "facts": [
        "MIT",
        "Gid 84",
        "138M/wk"
       ]
      },
      {
       "name": "MDX",
       "why": "Write JSX directly in Markdown for rich, interactive content and documentation.",
       "path": "tools/mdx-js/",
       "facts": [
        "MIT",
        "Gid 73",
        "33.8M/wk"
       ]
      }
     ],
     "more": "Compare react-markdown with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install react-markdown"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## react-markdown\n- Import the default export (`import Markdown from 'react-markdown'`). The package is ESM only and needs Node.js 16+.\n- Pass the markdown string as `children`. Never render markdown with `dangerouslySetInnerHTML`.\n- For tables, strikethrough, tasklists or bare URLs, add `remark-gfm` to `remarkPlugins`. To pass plugin options, use `[[plugin, options]]`.\n- Customize output through the `components` map (for example `code`, `a`, `h2`). Don't post-process the HTML.\n- With async plugins, use `MarkdownAsync` on the server or `MarkdownHooks` on the client. Give `MarkdownHooks` a `fallback`.\n- Use either `allowedElements` or `disallowedElements`, never both. Keep the default `urlTransform` unless you need different URL rules.\n- When using `rehype-katex`, import `katex/dist/katex.min.css` yourself.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm react-markdown"
  ],
  [
   "Category",
   "Markdown, editors and content"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "10.1.0, March 7, 2025"
  ],
  [
   "On GitHub since",
   "May 2015"
  ],
  [
   "Gid Score",
   "83.4"
  ],
  [
   "Rank in category",
   "#1 of 149"
  ],
  [
   "GitHub",
   "remarkjs/react-markdown"
  ],
  [
   "Last change",
   "Oct 3, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/remarkjs.png"
}