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

enriched-text-input

v1.0.5

Published

JavaScript only rich text input component for React Native. Compatible with Expo Go.

Readme

enriched-text-input

[!Note] This library is still a work in progress. Expect breaking changes.

Proof of concept for a JavaScript only rich-text TextInput component for React Native. The main idea is to render <Text> views as children of <TextInput>. It will only support text styling since it's not possible to render images inside Text views in React Native. Try it on Expo Snack.

Motivation

The field for rich-text in react native is still a bit green. Current libraries that add support for rich-text in react native applications are either WebViews wrapping libraries for the web, limiting customization, or require native code which drops support for Expo Go and react-native-web.

In theory, by only using JavaScript we are able to provide better cross-platform compatibility and the possibility to style elements however you want as long as they follow react-native's Text supported styles.

Installation

npm install enriched-text-input

Usage

import { useRef } from 'react';
import { StyleSheet, View } from 'react-native';
import { EnrichedTextInput, Toolbar } from 'enriched-text-input';

export default function App() {
  const richTextInputRef = useRef(null);

  return (
    <View style={styles.container}>
      <EnrichedTextInput ref={richTextInputRef}/>
      <Toolbar richTextInputRef={richTextInputRef}>
        <Toolbar.Bold />
        <Toolbar.Italic />
        <Toolbar.Underline />
        <Toolbar.Strikethrough />
        <Toolbar.Code />
        <Toolbar.Keyboard />
      </Toolbar>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    paddingTop: 120
  },
});

Current state

At the moment [1/1/2026] enriched-text-input works great for things such as small rich-text inputs (Eg. an input for a messaging app with rich-text support) but not for creating whole rich-text editors. This is because inline styles that do not break line are working as expected (Eg. bold, italic or underline work great but styles such as headings break line so they are currently not yet supported).

Live parsing of rich text symbols (such as wrapping words in asterisks *) is still a work in progress an not working correctly but you can toggle styles through the ref api of the EnrichedTextInput (or use the provided Toolbarcomponent as shown in the example usage).

Features

  • [x] Inline markdown styles (bolditalic, underline, ~~strikethrough~~ and inline code).
  • [ ] Paragraph styles (headings, lists, quotes, etc).
  • [ ] Live rich-text parsing.
  • [ ] Links and mentions.
  • [x] Custom inline styles.
  • [x] Custom methods and event handlers (setValue, onStartMention, onStyleChange, etc).

API Reference

API Reference

Style patterns

Style patterns are the styles that you provide the input with for it to know how it should display certain portions of the text. You can check their structure in the API reference.

By default enriched-text-input uses a set of markdown styles (such as bold, italic, underline, ~~strikethrough~~ and inline code) for you to use out of the box, but you can provide your own custom styles through the stylePatterns prop. Keep in mind that when using this prop enriched-text-input will ignore any default style patterns so that only the ones you provided will be valid.

If you want you can provide enriched-text-input with both default style patterns and any additional style patterns you define:

import { EnrichedTextInput, markdownStyles } from "enriched-text-input";

const customStyles = [
	{
		name: "comment",
		opening: null,
		closing: null,
		render: Comment
	}
];

<EnrichedTextInput
	stylePattrns={[...markdownStyles, ...customStyles]}
/>

Applying styles

To apply styles you can either toggle them using the ref method .toggleStyle() which accepts as a parameter the name of a style pattern, or you can use rich-text enclosures while typing. This enclosures are defined within the stylePatterns prop and corresponding styles will get applied when a matching pattern is found inside the input.

Known limitations

  • Inline images.
  • Only Text component styles are supported.

Contributing

Contributing guide