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

react-native-pure-markdown-input

v1.0.1

Published

A high-performance, real-time Markdown-highlighted TextInput component for React Native and Expo.

Readme

react-native-pure-markdown-input 📝✨

A high-performance, real-time Markdown-highlighted TextInput component for React Native and Expo. Built completely in TypeScript with zero heavy dependencies or WebViews.

Unlike other editors that rely on heavy, slow WebViews or suffer from typing lag and cursor jumping, react-native-pure-markdown-input uses native platforms' rich text layout engines (CoreText / Layout) to provide smooth, high-fidelity real-time syntax styling in standard multiline input fields.


🚀 Key Features

  • ⚡ Zero WebView Overhead: Highly-optimized tokenizing parser translates characters to nested native Text elements with zero scrolling lag.
  • 📱 Dual Compatibility: Runs out of the box in Expo Go (no custom dev clients required) and Bare React Native projects.
  • 🔮 Perfect Cursor Physics: Non-destructive tokenizer preserves every single character verbatim, preventing cursor jumps or word-wrap glitches.
  • 🎨 Low-Opacity Markdown Markers: Automatically fades Markdown formatting symbols (like **, *, []) to keep the editor clean yet easily editable.
  • 🌙 Dark & Light Themes: Sleek presets out of the box, with full control to override individual markdown element styles.
  • 💪 Strict TypeScript: Fully typed definitions export for seamless IDE autocompletions.

📦 Installation

Install the library in your React Native project:

npm install react-native-pure-markdown-input
# or
yarn add react-native-pure-markdown-input

💻 Usage

Simply replace your standard TextInput with <MarkdownInput />.

import React, { useState } from 'react';
import { SafeAreaView, StyleSheet, View } from 'react-native';
import { MarkdownInput } from 'react-native-pure-markdown-input';

export default function App() {
  const [text, setText] = useState(
    "# Markdown Editor\n\n" +
    "This is **bold** text and this is *italic* text.\n\n" +
    "Check out inline `const code = true;` or links like [GitHub](https://github.com).\n\n" +
    "> A blockquote that spans multiple characters."
  );

  return (
    <SafeAreaView style={styles.container}>
      <View style={styles.card}>
        <MarkdownInput
          value={text}
          onChangeText={setText}
          theme="dark" // 'dark' | 'light'
          placeholder="Start writing markdown..."
          style={styles.editor}
        />
      </View>
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#0F172A',
  },
  card: {
    flex: 1,
    margin: 16,
    borderRadius: 12,
    backgroundColor: '#1E293B',
    overflow: 'hidden',
  },
  editor: {
    flex: 1,
    padding: 16,
    color: '#E2E8F0',
  },
});

🎨 Customizing Styles & Themes

You can customize elements by providing the markdownStyles property:

<MarkdownInput
  value={text}
  onChangeText={setText}
  theme="light"
  markdownStyles={{
    bold: {
      fontWeight: '900',
      color: '#4F46E5', // Slate Indigo
    },
    syntax: {
      color: 'rgba(79, 70, 229, 0.3)', // Indigo marker highlights
    },
    code: {
      backgroundColor: '#FEF3C7',
      color: '#D97706',
      fontFamily: 'Courier',
    },
  }}
/>

📖 Component API

| Prop | Type | Default | Description | | :--- | :--- | :--- | :--- | | value | string | Required | The raw markdown text value of the editor. | | onChangeText | (text: string) => void | Required | Callback invoked when the raw text changes. | | theme | 'dark' \| 'light' | 'dark' | Standard dark or light editor themes. | | markdownStyles | MarkdownStyles | undefined | Custom text styling parameters to override individual tags. | | onMarkdownParse | (segments: TextSegment[]) => void | undefined | Optional callback triggered when markdown parses (for word/char counts or custom preview rendering). | | Standard Props | TextInputProps | - | Inherits all properties from React Native's <TextInput> (e.g. placeholder, keyboardType, ref, etc). |


🛠️ Markdown Element Overrides

You can supply individual styles for the following Markdown selectors:

  • bold (**text**, __text__)
  • italic (*text*, _text_)
  • strikethrough (~~text~~)
  • code (`inline code`)
  • link ([label](url))
  • blockquote (> text)
  • bullet (- item, * item, • item)
  • codeblock (``` block ```)
  • syntax (Markdown formatting tokens)
  • header1 (# ) to header6 (###### )

🛡️ License

This project is licensed under the MIT License.