React Native Markdown Display: Setup and Styling (2026)

November 11, 2026 · 10 min read

React Native Markdown Display: Render Markdown in Mobile Apps

React Native Markdown display libraries turn a Markdown string into native Text and View components on iOS and Android, with no WebView. As of November 2026, install the maintained @ronradtke/react-native-markdown-display fork (9.0.3) or react-native-marked (8.3.4), because the original package last shipped in 2023. This tutorial covers setup, styling, custom rules, links and the syntax phones drop.

Is react-native-markdown-display Still Maintained?

Not really. The original react-native-markdown-display package on npm is still at 7.0.2, published on 11 December 2023, and it depends on markdown-it 10. It still installs and works, but bug fixes and newer markdown-it releases don't reach it.

The @ronradtke fork picked up where the original stopped. We checked the npm registry on 11 November 2026:

PackageLatestPublishedParser
react-native-markdown-display7.0.211 Dec 2023markdown-it 10
@ronradtke/react-native-markdown-display9.0.329 Jun 2026markdown-it 14
@react-native-ohos/react-native-markdown-display7.1.117 Aug 2026markdown-it 14
react-native-marked8.3.44 Nov 2026marked 18

The @react-native-ohos package is a HarmonyOS (OpenHarmony) port of the original, so skip it unless you target HarmonyOS. The fork's releases come in bursts: 8.1.0 landed in January 2025, then 9.0.0, 9.0.1 and 9.0.3 all arrived on 29 June 2026. The 9.x line includes MarkdownStream for streaming text, MarkdownComposer for authoring, a colorScheme prop and highlighted fenced code.

We prefer the fork for most apps. It keeps the props of the original package, so moving over is mostly a rename of the import. Re-test any custom style and rules after you switch, since 9.x is two major versions past 7.0.2.

Install React Native Markdown Display and Render a Screen

Add the fork with npm or Yarn. The fork's README describes it as running only in JS with no native code needed.

npm install @ronradtke/react-native-markdown-display

The <Markdown> component takes the string as its child. It doesn't scroll on its own, so put it inside a ScrollView for anything longer than a few lines.

import React from 'react';
import {ScrollView} from 'react-native';
import Markdown from '@ronradtke/react-native-markdown-display';

const helpText = `# Getting started

Tap a note to open it. **Long press** to pin it.

- Swipe left to archive
- Pull down to refresh`;

export default function HelpScreen() {
  return (
    <ScrollView contentContainerStyle={{padding: 16}}>
      <Markdown>{helpText}</Markdown>
    </ScrollView>
  );
}

That renders a large heading, a paragraph with bold text and a two-item bulleted list. Every element is a real React Native view, so it follows your app's layout and font scaling. If you're on the original package, the only change is the import path: react-native-markdown-display.

Style Headings, Code and Table Borders with the style Prop

The style prop takes an object keyed by element name: body, heading1 to heading6, code_inline, fence, link, table, tr, th, td and more. With mergeStyle left at its default of true, your keys merge into the built-in styles instead of replacing them.

Text properties cascade down the tree. A color or fontSize on body reaches almost every text node, which makes body the best place for your base font. Set it once there rather than on each heading.

Tables are the usual sticking point. The defaults draw a border around the table and a bottom border on each tr, but nothing between columns. Add a right border to th and td to get a full grid:

import {StyleSheet} from 'react-native';

const markdownStyles = StyleSheet.create({
  body: {color: '#1f2933', fontSize: 16},
  heading1: {fontSize: 26, marginBottom: 8},
  code_inline: {backgroundColor: '#eef2f6', borderWidth: 0, padding: 2},
  table: {borderColor: '#cbd2d9'},
  tr: {borderColor: '#cbd2d9'},
  th: {borderColor: '#cbd2d9', borderRightWidth: 1, fontWeight: 'bold'},
  td: {borderColor: '#cbd2d9', borderRightWidth: 1},
});

// <Markdown style={markdownStyles}>{helpText}</Markdown>

Header cells now render bold with a vertical line after each column. The last column also draws a right border next to the table's own, which gives a slightly heavier right edge. Most apps accept that. To remove it, add borderRightWidth: 0 to table so only the cell borders draw that edge.

Custom Rules: Change How a Markdown Node Renders

Styles change how an element looks. The rules prop changes what it renders as. Each rule receives node, children, parent and styles. Set key={node.key} on the element it returns, as every built-in rule does.

This rule makes level-1 headings announce themselves as headers to VoiceOver and TalkBack:

import {Text} from 'react-native';

const rules = {
  heading1: (node, children, parent, styles) => (
    <Text key={node.key} accessibilityRole="header" style={styles.heading1}>
      {children}
    </Text>
  ),
};

// <Markdown rules={rules} style={markdownStyles}>{helpText}</Markdown>

Your rule replaces the default for heading1 only. Every other element keeps the built-in rule. To see which node types a string produces, pass debugPrintTree and read the tree in your console before you write a rule.

How Do You Handle Link Presses in React Native Markdown?

By default, tapping a link calls React Native's Linking.openURL, which hands the URL to the browser or another app. Pass onLinkPress to step in first. In both the original 7.0.2 source and the fork's 9.0.3 source, returning true lets the library call Linking.openURL. Returning false means you've handled it.

import {useNavigation} from '@react-navigation/native';
import Markdown from '@ronradtke/react-native-markdown-display';

export function NoteBody({text}) {
  const navigation = useNavigation();

  const onLinkPress = (url) => {
    if (url.startsWith('myapp://note/')) {
      navigation.navigate('Note', {id: url.slice('myapp://note/'.length)});
      return false;
    }
    return true;
  };

  return <Markdown onLinkPress={onLinkPress}>{text}</Markdown>;
}

A link like [See the setup note](myapp://note/42) now opens a screen inside the app, while web links still open in the browser. One caution: the fork's Viewer guide currently words the return value the other way round. We went by the source code, so test a link both ways in your own build.

Restrict Syntax with a Custom markdown-it Instance

Chat messages and user comments often shouldn't contain links or images. The markdownit prop takes your own markdown-it instance, and the default is MarkdownIt({typographer: true}). Disable rules on it to switch syntax off:

import Markdown, {MarkdownIt} from '@ronradtke/react-native-markdown-display';

const chatParser = MarkdownIt({typographer: true}).disable(['link', 'image', 'autolink']);

// <Markdown markdownit={chatParser}>{message}</Markdown>

With links disabled, [Docs](https://example.com) appears exactly as typed, brackets and URL included. Keep the autolink entry: without it, <https://example.com> still becomes a tappable link. Create the instance once at module level, not inside the component. The prop also works in reverse: MarkdownIt({typographer: true, linkify: true}) turns bare URLs into links, which the default leaves off.

Which Markdown Syntax Won't Render in React Native?

A web editor and a phone screen don't render the same Markdown. The default parser in both the original and the fork uses markdown-it with html and linkify off and no plugins. We ran the same input through markdown-it 14 to confirm what reaches the renderer:

  • Raw HTML such as <kbd>Ctrl</kbd> prints as literal text, tags included. Turning html on doesn't fix it: no rule renders HTML tokens, so the tags vanish and only an unstyled Ctrl shows.
  • Task lists: - [ ] Turn on sync becomes a normal bullet that reads [ ] Turn on sync.
  • Bare URLs stay plain text unless you enable linkify. Links written as <https://example.com> still work.
  • Math such as $x^2$ shows the dollar signs, and a Mermaid fence renders as a code block.
  • Images load only when the URL starts with https://, http:// or a base64 PNG, GIF or JPEG data URI. Anything else gets https:// prepended, so a relative path like img/tip.png breaks. Change this with allowedImageHandlers and defaultImageHandler.
  • Single line breaks inside a paragraph become new lines, so a two-line paragraph keeps both lines.

The help screen below is loaded in our editor so you can compare. The preview renders the table, shows the task item as a disabled checkbox and draws the <kbd> keys. On a phone, those last two would arrive as raw text.

Getting started

Welcome to Pocket Notes. Read the support page any time.

  • Swipe left to archive
  • Long press to pin
  • Turn on sync
Gesture Action
Swipe left Archive
Long press Pin

On a tablet keyboard, press <kbd>Ctrl</kbd> + <kbd>N</kbd> for a new note.

59 words325 characters14 lines
Markdown

We draft app copy in the editor, check it in the live preview, then strip any HTML and task items before it ships. That workflow has a limit: no browser preview mirrors a native renderer exactly, so give the final string one pass on a device too.

react-native-markdown-display vs react-native-marked vs a WebView

react-native-marked is the main alternative. It parses with marked instead of markdown-it and renders through a FlatList, so don't nest the component inside a ScrollView. Its useMarkdown hook returns plain elements for when you need your own list or scroll view. Version 8 needs React Native 0.76 or newer plus react-native-svg. For 0.75 and below, its README says to install 6.0.7.

import Markdown from 'react-native-marked';

// helpText is the same string as in the first example
export default function HelpScreen() {
  return <Markdown value={helpText} flatListProps={{initialNumToRender: 8}} />;
}

The string goes in the value prop rather than as a child, and flatListProps passes options to the underlying list.

@ronradtke forkreact-native-markedWebView
Renders asNative viewsNative views in a FlatListA web page
Raw HTMLLiteral textPlain text, per its READMERendered
Math and MermaidNoNoYes, with web libraries
Customise withstyle, rules, markdownitstyles, theme, custom RendererCSS
React NativePeer 0.50.4+0.76+ (6.0.7 for older)Any

Pick the fork if you want markdown-it plugins or you're migrating from the original. Pick react-native-marked for frequent releases, a hook-based API and a list renderer suited to long documents. A WebView only makes sense when you truly need raw HTML, KaTeX or Mermaid. You give up native text styling and have to size the view yourself.

For marked and markdown-it themselves, see our guide to rendering Markdown in JavaScript. On the web, use react-markdown instead. Building the same screen in Dart? The Flutter Markdown tutorial covers the Flutter side. For coloured code blocks in a React web app, see our React Syntax Highlighter tutorial.

React Native Markdown Display FAQ

Whichever package you choose, react native markdown display works best when the Markdown is written for a phone: headings, emphasis, lists, links, code and simple tables. Draft and check that content in the Markdown editor, or turn it into HTML for a WebView with the Markdown to HTML converter. Then render it with the fork or react-native-marked and check it on a real device.