/ MarkDown

Generate GitHub Flavored Markdown using React Native WebView

Generate GitHub Flavored Markdown using React Native WebView

React Native Github Markdown

Generate GitHub Flavored Markdown (with syntax highlight) using React Native WebView.



npm i react-native-github-markdown


  • Render GitHub Flavored Markdown on your React Native WebView

  • Auto-height WebView adjusted to the document

  • Code syntax highlighting


  • Tested with Expo, i.e. WebView module shipped with React Native core. It should also work well with react-native-webview though, as long as you substitute it for the old one (pull requests welcomed)

  • Code syntax highlighting seems odd for long code snippets. It's a problem with highlight.js. You can choose to disable it using highlight prop


import MarkdownWebView from "react-native-github-markdown";

  style={{ marginTop: 10 }}
  content={"# React Native Github Markdown\n\nHello world!"}


For react-native-webview-autoheight

  • autoHeight (default: true) disable it if you don't want auto-height
  • width (default: Screen width)
  • defaultHeight (default height unless autoHeight)

For Markdown

  • content raw markdown content to render
  • highlight whether to use highlight.js for syntax highlighting