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-plain-text

v0.9.3

Published

Faster, lighter React Native <Text> for single-style text

Readme

React Native Plain Text

npm version license

PlainText is a faster, lighter alternative to React Native's built-in <Text> component that focuses on single-style text. This covers most real-world text: headers, labels, body copy.

It renders straight to the platform's native text views: UILabel on iOS, TextView on Android, instead of using React Native's text layout pipeline.

The tradeoff: one style, no nested <Text>.

Should you use it?

For most apps, RN's <Text> is a reasonable choice. Two reasons to pick PlainText instead:

  1. Performance. On screens that mount a lot of single-style labels at once, like feeds and long lists, it mounts faster and uses less memory.
  2. Features and bug fixes missing from RN <Text>: verticalAlign / textAlignVertical on iOS and fontVariationSettings, and animated text.

You can mix it with <Text> in the same screen and only use it where it earns its place. The Text component is an easy adoption path: a drop-in replacement for RN <Text> that picks PlainText for you where it can. Using PlainText directly gives you the best performance.

Installation

npm install react-native-plain-text

This is a native module, so installing it is not enough. Rebuild the app, running pod install first on iOS. It does not work in Expo Go, so use a dev client or a bare app.

Requires the New Architecture (Fabric).

Usage

import { PlainText } from 'react-native-plain-text';

<PlainText style={{ fontSize: 16 }}>Hello from PlainText 👋</PlainText>;

Unified Text component

For an easy adoption path that doesn't require touching existing <Text> call sites, import Text instead of PlainText:

import { Text } from 'react-native-plain-text';

<Text style={{ fontSize: 16 }}>Hello from Text 👋</Text>;

It's a selector component: PlainText for simple strings, falling back to RN <Text> for anything PlainText doesn't support (nested text, element children). See the Text component guide for how it decides and how to build the same pattern into your own centralized Text component.

Using PlainText directly still gives you the best performance.

Props and styles

children accepts text only: a string, or text-like children such as {count} items (strings, numbers and bigints; null and booleans render nothing). No nested <Text>, no elements.

Everything below is API-compatible with RN <Text>. Most commonly used:

  • Styles: fontSize, color, fontWeight, fontFamily, fontStyle, lineHeight, letterSpacing, textAlign, textDecorationLine, textTransform, plus every other ViewStyle prop (width, margin, padding, backgroundColor, opacity, …), forwarded to the native view as-is.
  • Props: numberOfLines, ellipsizeMode, allowFontScaling, maxFontSizeMultiplier, onLayout, testID, nativeID / id, and all of RN's accessibility props (accessible, accessibilityLabel, accessibilityRole, accessibilityState, …), including the aria-* aliases RN <Text> accepts (aria-label, aria-hidden, aria-busy, aria-checked, aria-disabled, aria-expanded, aria-selected), resolved with the same precedence RN uses.

Beyond RN <Text>, PlainText adds hyphenation control:

  • hyphens (prop): 'none' | 'auto', default 'none'. 'none' keeps the platform's default hyphenation behavior — it never touches an inserted soft hyphen (­) on either platform. 'auto' hyphenates automatically (pair with lang on iOS). On Android, hyphens wins over android_hyphenationFrequency whenever the prop is passed at all; omit it entirely to let android_hyphenationFrequency apply instead.
  • android_hyphenationFrequency (prop): Android only, like RN <Text>: 'none' | 'normal' | 'full'. Only applies as a fallback when hyphens is left unset.
  • lang (prop): BCP-47 language tag (e.g. 'de'), picking the hyphenation dictionary and locale-sensitive line breaking.

See Props and styles for the full support matrix, platform notes, and additions beyond RN <Text> such as fontVariationSettings.

Not supported

Following are deliberately excluded:

  • Nested <Text> elements and mixed styles
  • Press and touch handling (onPress, onLongPress, the responder handlers). Wrap PlainText in a Pressable instead.

Use RN's <Text> where you need any of these. See Props and styles for the detailed list of what's out of scope and what's planned.

Performance

Compared with RN <Text> rendering the same content on the same device:

| | iOS | Android | | ------------------------ | ------------- | ----------- | | Time to mount 1000 views | 13–21% faster | ~30% faster | | Memory per mounted view | 15–25% less | ~33% less |

Self-measured from the example app. See Performance for the method and the per-device numbers behind these percentages.

Contributing

License

MIT