npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codearcade/expo-markdown-native

v2.0.4

Published

Native Markdown rendering for Expo & React Native with built-in syntax highlighting.

Readme

@codearcade/expo-markdown-native 🚀

A powerful, fully customizable, pure JavaScript/TypeScript Markdown renderer for React Native and Expo.

Featuring beautiful native syntax highlighting, interactive code blocks, copy-to-clipboard functionality, and dark mode support out of the box.

✨ Features (v2.0)

  • 100% Pure JS/TS: No native linking required! Works seamlessly with Expo Go and bare React Native.
  • Beautiful Code Blocks: Built-in syntax highlighting using highlight.js.
  • Standalone CodeBlock: Exported component for when you just need to highlight a snippet without parsing full markdown.
  • Highly Customizable: Style every single markdown node, plus granular control over code block containers, headers, and padding via the new codeStyle prop.
  • Interactive: Built-in support for intercepting links and copying code to the clipboard.

📦 Installation

npm install @codearcade/expo-markdown-native  
# or  
yarn add @codearcade/expo-markdown-native  

Note: If you haven't already, you may need to install peer dependencies depending on your package manager: react-native-svg and react-native-safe-area-context.

🚀 Quick Start

import React from 'react';  
import { SafeAreaView, Alert } from 'react-native';  
import { Markdown } from '@codearcade/expo-markdown-native';  
  
const content = \`  
\# Hello World  
This is a \*\*bold\*\* statement.  
  
Here is some code:  
\\\`\\\`\\\`javascript  
const greeting = "Hello, React Native!";  
console.log(greeting);  
\\\`\\\`\\\`  
\`;  
  
export default function App() {  
return (  
<SafeAreaView style={{ flex: 1, padding: 20 }}>  
<Markdown  
content={content}  
theme="dark"  
onCopy={(text) => Alert.alert('Copied to clipboard!')}  
onLinkPress={(url) => {  
console.log(\`Navigating to ${url}\`);  
return true; // Return true to prevent default opening behavior  
}}  
/>  
</SafeAreaView>  
);  
} 

🎨 Styling Guide

1. Styling Code Blocks (codeStyle)

In v2, we introduced a single, powerful codeStyle object to give you granular control over code blocks without prop-clutter.

<Markdown  
content={content}  
codeStyle={{  
// 1. Outer Box: Border radius, margins, border colors  
container: {  
borderRadius: 16,  
borderColor: '#444',  
borderWidth: 1,  
},  
// 2. Header Bar: Height, background color, padding  
header: {  
backgroundColor: '#1e1e1e',  
paddingVertical: 10,  
},  
// 3. Header Text: The "JAVASCRIPT" label  
headerText: {  
color: '#a0a0a0',  
},  
// 4. Inner Padding: Give the code some breathing room  
content: {  
padding: 20,  
},  
// 5. Code Text: Font size, line height  
text: {  
fontSize: 14,  
}  
}}  
/>  

2. Styling Markdown Nodes (styles)

You can override the default text and layout styles by passing a styles object. The keys correspond to the Markdown nodes.

<Markdown  
content={content}  
styles={{  
body: { fontSize: 16, color: '#333' },  
heading1: { fontSize: 32, fontWeight: 'bold' },  
code\_inline: { backgroundColor: '#f0f0f0', color: '#e01e5a', borderRadius: 4 },  
link: { color: '#007AFF', textDecorationLine: 'underline' },  
}}  
/>  

Available Style Keys:

body, heading1 through heading6, hr, strong, em, s (strikethrough), blockquote, bullet_list, ordered_list, list_item, code_inline, code_block, fence, table, thead, tbody, th, tr, td, link, image.

🧩 Standalone <CodeBlock />

Don't need a full markdown parser? You can use our syntax highlighter completely standalone!

import { CodeBlock } from '@codearcade/expo-markdown-native';  
  
<CodeBlock  
content="console.log('Just a standalone snippet!');"  
language="javascript"  
appTheme="dark"  
onCopy={() => console.log('Copied!')}  
/>  

📖 API Reference

Props

| Prop | Type | Default | Description | | --- | --- | --- | --- | | content | string | Required | The raw markdown string to render. | | theme | 'light' | 'dark' | 'light' | Base theme for background/text colors. | | codeTheme | ReactStyle | github / monokai | Highlight.js theme object for syntax. | | styles | Record<string, Style> | {} | Override styles for specific markdown nodes. | | codeStyle | MarkdownCodeStyle | {} | Advanced styling for code block containers. | | onLinkPress | (url) => boolean | undefined | Fired when a link is pressed. | | onCopy | (text) => void | undefined | Fired when the code block copy button is pressed. |

⚠️ Upgrading to v2.0

Version 2.0 is a complete rewrite to 100% TypeScript/JavaScript.

  • Native Modules Removed: You no longer need to rebuild your native app or deal with auto-linking.
  • Prop Changes: Individual props like codePadding, codeRadius, and codeHeaderHeight have been removed. Please use the new unified codeStyle prop instead.

📄 License

MIT