Software Mansion's best practices for rich text in React Native using react-native-enriched and react-native-enriched-markdown.

MITAuto-check passedMobile

Install Rich Text

skills CLI
$ npx skills add kingstinct/react-native-healthkit --skill rich-text -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kingstinct/react-native-healthkit rich-text --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kingstinct/react-native-healthkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/react-native-best-practices/references/rich-text .claude/skills/rich-text && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rich-text
GitHub stars
716
Token cost
~3.1k tokens
SKILL.md length
811 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Software Mansion's best practices for rich text in React Native using react-native-enriched and react-native-enriched-markdown.

  • Building rich text editors
  • SKILL.md covers Choosing the right library, react-native-enriched (Editor), react-native-enriched-markdown… and Known limitations
  • Calls npm; reaches reactnative.dev
  • Formatted text inputs

What it does

Rich Text is an agent skill from kingstinct/react-native-healthkit. Software Mansion's best practices for rich text in React Native using react-native-enriched and react-native-enriched-markdown. Use when building rich text editors, formatted text inputs, Markdown renderers, or any feature requiring inline styling, mentions, links, structured text editing, or Markdown display. Trigger on: 'rich text editor', 'rich text input', 'text editor', 'react-native-enriched', 'react-native-enriched-markdown', 'EnrichedTextInput', 'EnrichedMarkdownText', 'formatted text input', 'WYSIWYG'…

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Cross-platform mobile apps, Markdown and LaTeX. It works with React Native, LaTeX and iOS. The repository describes itself as: HealthKit bindings for React Native with TypeScript. The licence is MIT.

When your agent uses it

  • Building rich text editors
  • Formatted text inputs
  • Markdown renderers
  • Any feature requiring inline styling

Example prompts

  • “rich text editor”
  • “rich text input”
  • “text editor”
  • “/rich-text”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 9e4e186. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • reactnative.dev

    Also links to:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rich Text loads about 3.1k tokens when it runs. Until then it costs about 192 tokens; SKILL.md has 811 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~192
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from kingstinct/react-native-healthkit at commit 9e4e186, republished under its MIT licence (© kingstinct). 811 words, ~3,112 tokens.

Download SKILL.mdSave it as .claude/skills/rich-text/SKILL.md (or your agent's skills folder).
name
rich-text
description
Software Mansion's best practices for rich text in React Native using react-native-enriched and react-native-enriched-markdown. Use when building rich text editors, formatted text inputs, Markdown renderers, or any feature requiring inline styling, mentions, links, structured text editing, or Markdown display. Trigger on: 'rich text editor', 'rich text input', 'text editor', 'react-native-enriched', 'react-native-enriched-markdown', 'EnrichedTextInput', 'EnrichedMarkdownText', 'formatted text input', 'WYSIWYG', 'mentions input', 'text formatting toolbar', 'markdown renderer', 'markdown display', 'render markdown', 'display markdown natively', 'LaTeX math', 'GFM tables', or any request to build rich text editing or Markdown rendering in React Native.

Rich Text in React Native

Software Mansion's production patterns for rich text editing and Markdown rendering in React Native.

There are two libraries that cover rich text use cases:

LibraryComponentPurpose
react-native-enrichedEnrichedTextInputRich text editing (input)
react-native-enriched-markdownEnrichedMarkdownTextMarkdown rendering (display)

Both libraries require the React Native New Architecture (Fabric) and support iOS and Android.

Choosing the right library

  • User needs to type/edit rich text (bold, italic, mentions, links, inline images): use react-native-enriched
  • App needs to display Markdown content (chat messages, documentation, AI responses): use react-native-enriched-markdown
  • Both editing and display: use both libraries together

react-native-enriched (Editor)

EnrichedTextInput is a native, uncontrolled rich text input. It directly interacts with platform-specific components for performance, meaning it does not use React state for its value.

bash
npm install react-native-enriched
Basic usage
tsx
import { EnrichedTextInput } from 'react-native-enriched';
import type {
  EnrichedTextInputInstance,
  OnChangeStateEvent,
} from 'react-native-enriched';
import { useState, useRef } from 'react';
import { View, Button, StyleSheet } from 'react-native';

export default function RichEditor() {
  const ref = useRef<EnrichedTextInputInstance>(null);
  const [stylesState, setStylesState] = useState<OnChangeStateEvent | null>();

  return (
    <View style={styles.container}>
      <EnrichedTextInput
        ref={ref}
        onChangeState={(e) => setStylesState(e.nativeEvent)}
        style={styles.input}
      />
      <Button
        title={stylesState?.bold.isActive ? 'Unbold' : 'Bold'}
        color={stylesState?.bold.isActive ? 'green' : 'gray'}
        onPress={() => ref.current?.toggleBold()}
      />
    </View>
  );
}
Key concepts

Toggling styles via ref: All formatting is applied imperatively through the ref. Call ref.current?.toggleBold(), ref.current?.toggleItalic(), etc.

Style detection via onChangeState: The onChangeState callback fires whenever the style state changes (e.g., cursor moves into bold text). Each style reports three properties:

  • isActive: The style is applied at the current selection (highlight the toolbar button)
  • isBlocking: The style is blocked by another active style (disable the toolbar button)
  • isConflicting: The style conflicts with another active style (toggling it removes the conflicting style)

Inline vs paragraph styles:

  • Inline styles (bold, italic, underline, strikethrough, inline code) apply to the exact character range selected. With no selection, they apply to the next characters typed.
  • Paragraph styles (headings, codeblock, blockquote, lists) apply to entire paragraphs (text between newlines). If the selection spans multiple paragraphs, all are affected.

HTML output: Get HTML via ref.current?.getHTML() (on-demand, returns a Promise) or the onChangeHtml callback (continuous, has performance cost for large documents). Prefer getHTML() when you only need HTML at save time.

Setting content: Use defaultValue prop for initial HTML content, or ref.current?.setValue(html) to update imperatively.

Supported styles

The OnChangeStateEvent key column shows the exact property name on the event object returned by onChangeState. Use these keys when reading style state (e.g. stylesState.strikeThrough.isActive). Note that casing varies (e.g. strikeThrough with capital T, inlineCode with capital C).

StyleToggle methodOnChangeStateEvent keyType
BoldtoggleBold()boldInline
ItalictoggleItalic()italicInline
UnderlinetoggleUnderline()underlineInline
StrikethroughtoggleStrikeThrough()strikeThroughInline
Inline codetoggleInlineCode()inlineCodeInline
H1toggleH1()h1Paragraph
H2toggleH2()h2Paragraph
H3toggleH3()h3Paragraph
H4toggleH4()h4Paragraph
H5toggleH5()h5Paragraph
H6toggleH6()h6Paragraph
Code blocktoggleCodeBlock()codeBlockParagraph
Block quotetoggleBlockQuote()blockQuoteParagraph
Ordered listtoggleOrderedList()orderedListParagraph
Unordered listtoggleUnorderedList()unorderedListParagraph
Checkbox listtoggleCheckboxList(checked)checkboxListParagraph

Links are detected automatically (customizable via linkRegex prop) or applied manually:

tsx
// Set link on selected text
ref.current?.setLink(selection.start, selection.end, selectedText, url);

// Remove link
ref.current?.removeLink(start, end);

Use onChangeSelection to get selection position and onLinkDetected to detect when the cursor is near a link.

Mentions

Mentions support custom indicators (default: @). Set custom indicators via the mentionIndicators prop.

tsx
<EnrichedTextInput
  ref={ref}
  mentionIndicators={['@', '#']}
  onStartMention={(indicator) => { /* show picker */ }}
  onChangeMention={({ indicator, text }) => { /* filter list */ }}
  onEndMention={(indicator) => { /* hide picker */ }}
/>

// Complete the mention when user selects from picker
ref.current?.setMention('@', 'John Doe', { userId: '123' });
Inline images
tsx
ref.current?.setImage(imageUri, width, height);

Images are inserted at the cursor position (or replace selected text) and affect line height. You are responsible for providing correct dimensions.

For the full API (all props, ref methods, events, HtmlStyle customization, context menu items), webfetch the react-native-enriched README.


Show full SKILL.md (307 more words)Show less

react-native-enriched-markdown (Renderer)

EnrichedMarkdownText renders Markdown as fully native text (no WebView). It uses md4c for high-performance CommonMark-compliant parsing.

bash
npm install react-native-enriched-markdown
Basic usage
tsx
import { EnrichedMarkdownText } from 'react-native-enriched-markdown';
import { Linking } from 'react-native';

const markdown = `
# Welcome

This is **bold**, *italic*, and [a link](https://reactnative.dev).

- List item one
- List item two
`;

export default function MarkdownDisplay() {
  return (
    <EnrichedMarkdownText
      markdown={markdown}
      onLinkPress={({ url }) => Linking.openURL(url)}
    />
  );
}
Flavors
FlavorFeaturesLayout
commonmark (default)All CommonMark elements, inline math ($...$)Single TextView
githubCommonMark + GFM tables, task lists, block math ($$...$$)Segmented layout (separate TextViews + table views)
tsx
<EnrichedMarkdownText
  flavor="github"
  markdown={markdown}
  onLinkPress={({ url }) => Linking.openURL(url)}
/>
Tables (GFM)

Tables require flavor="github" and support column alignment, rich text in cells, horizontal scrolling, header styling, alternating row colors, and a long-press context menu.

tsx
<EnrichedMarkdownText
  flavor="github"
  markdown={tableMarkdown}
  markdownStyle={{
    table: {
      fontSize: 14,
      borderColor: '#E5E7EB',
      borderRadius: 8,
      headerBackgroundColor: '#F3F4F6',
      cellPaddingHorizontal: 12,
      cellPaddingVertical: 8,
    },
  }}
/>
Task lists (GFM)

Task lists require flavor="github". Handle checkbox taps with onTaskListItemPress:

tsx
<EnrichedMarkdownText
  flavor="github"
  markdown={`- [x] Done\n- [ ] Todo`}
  onTaskListItemPress={({ index, checked, text }) => {
    console.log(`Task ${index}: ${checked ? 'checked' : 'unchecked'}`);
  }}
/>
LaTeX math
  • Inline math ($...$): works in both flavors
  • Block math ($$...$$): requires flavor="github", must be on its own line

Use String.raw or double backslashes for LaTeX commands in JS strings.

Disable math to reduce bundle size (iosMath ~2.5 MB on iOS):

tsx
<EnrichedMarkdownText md4cFlags={{ latexMath: false }} markdown="..." />
Customizing styles

Use the markdownStyle prop. Memoize it with useMemo to avoid re-renders:

tsx
import type { MarkdownStyle } from 'react-native-enriched-markdown';

const markdownStyle: MarkdownStyle = useMemo(() => ({
  paragraph: { fontSize: 16, color: '#333', lineHeight: 24 },
  h1: { fontSize: 32, fontWeight: 'bold', marginBottom: 16 },
  code: { color: '#E91E63', backgroundColor: '#F5F5F5' },
  codeBlock: { backgroundColor: '#1E1E1E', color: '#D4D4D4', padding: 16, borderRadius: 8 },
  link: { color: '#007AFF', underline: true },
  blockquote: { borderColor: '#007AFF', backgroundColor: '#F0F8FF' },
}), []);

Inline elements inherit typography from their parent block (fontSize, fontFamily, color), then add their own styling on top.

tsx
<EnrichedMarkdownText
  markdown={content}
  onLinkPress={({ url }) => Linking.openURL(url)}
  onLinkLongPress={({ url }) => showShareSheet(url)}
  // On iOS, providing onLinkLongPress disables the system link preview
/>
Additional features
  • Text selection and copy: Enabled by default (selectable prop). Smart Copy provides plain text, Markdown, HTML, RTF, and RTFD on iOS.
  • Accessibility: VoiceOver and TalkBack support with custom rotors (iOS), semantic heading/link/image navigation, and proper list announcements.
  • RTL: Automatic on Android. On iOS, call I18nManager.forceRTL(true) before rendering.
  • Image caching: Three-tier caching (memory originals, memory processed variants, disk) with request deduplication.
  • Underline mode: md4cFlags={{ underline: true }} makes _text_ render as underline instead of italic.

For detailed API documentation, webfetch the relevant page from the upstream docs:


Known limitations

react-native-enriched
  • Only one level of lists (no nested lists)
  • iOS headings cannot have the same fontSize as the input's fontSize
react-native-enriched-markdown
  • flavor="github" segments text into separate TextViews, so text selection cannot span across segments

© kingstinct, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/react-native-best-practices/references/rich-text of kingstinct/react-native-healthkit.

Open the folder on GitHubat commit 9e4e186

Compare with similar skills

Rich Text next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rich Text compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rich Text this skillkingstinct/react-native-healthkit716—~3.1kAutomated safety check: PassMIT
Rich Textsoftware-mansion-labs/skills291—~5.4kAutomated safety check: PassNone
Rnn Codebasewix/react-native-navigation13k—~2kAutomated safety check: PassMIT
Ios26 Navigationwix/react-native-navigation13k—~8.3kAutomated safety check: PassMIT
App Store Reviewsafaiyeh/app-store-review-skill3621 repos~3.4kAutomated safety check: PassMIT
Apple Designvrcm-team/VRCM1791 repos~6.2kAutomated safety check: PassMIT

Similar skills

  • Rich Text

    software-mansion-labs/skills

    Software Mansion's best practices for rich text in React Native using react-native-enriched-html (formerly react-native-enriched) and react-native-enriched-markdown.

    291 GitHub stars~5.4k tokensUpdated 10 days ago
    MobileAuto-check passed
  • Rnn Codebase

    wix/react-native-navigation

    Official

    Navigate and work with the react-native-navigation (RNN) codebase.

    13k GitHub stars~2k tokensUpdated 2 days ago
    MobileAuto-check passed
  • Ios26 Navigation

    wix/react-native-navigation

    Official

    Reference for iOS 26 navigation bar, tab bar, toolbar, and Liquid Glass building blocks (UITab, scroll-edge effects, search placement, shared-background platter, UIButton glass configurations…

    13k GitHub stars~8.3k tokensUpdated 2 days ago
    MobileAuto-check passed
  • App Store Review

    safaiyeh/app-store-review-skill

    Evaluates code against Apple's App Store Review Guidelines. An agent skill from safaiyeh/app-store-review-skill.

    362 GitHub starsUsed in 1 repo~3.4k tokens
    MobileAuto-check passed
  • Apple Design

    vrcm-team/VRCM

    Cross-platform UI/UX design reviewer grounded in Apple's Human Interface Guidelines (122 pages pulled from developer.apple.com, including 57 component pages) plus a design-craft lens for…

    179 GitHub starsUsed in 1 repo~6.2k tokens
    MobileAuto-check passed
  • Expo Tailwind Setup

    CherryHQ/cherry-studio-app

    Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

    4k GitHub starsUsed in 8 repos~3k tokens
    MobileAuto-check passed

More from kingstinct/react-native-healthkit

All 11 skills in this repo
  • React Native Healthkit

    kingstinct/react-native-healthkit

    How to use @kingstinct/react-native-healthkit (and its sibling @react-native-healthkit/health-records) to read, write and subscribe to Apple HealthKit data from React Native / Expo apps.

    716 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Gestures

    kingstinct/react-native-healthkit

    Software Mansion's best practices for gestures in React Native apps using React Native Gesture Handler.

    716 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Expo Deployment

    kingstinct/react-native-healthkit

    Deploying Expo apps to iOS App Store, Android Play Store, web hosting, and API routes

    716 GitHub starsUsed in 4 repos~930 tokens
    Auto-check passed
  • React Native Healthkit Contributing

    kingstinct/react-native-healthkit

    How to change the react-native-healthkit monorepo itself (packages/core, packages/react-native-healthkit, packages/health-records, apps/example).

    716 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Multithreading

    kingstinct/react-native-healthkit

    Software Mansion's best practices for multithreading in React Native apps using react-native-worklets.

    716 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Expo Dev Client

    kingstinct/react-native-healthkit

    Build and distribute Expo development clients locally or via TestFlight

    716 GitHub starsUsed in 5 repos~879 tokens
    Auto-check passed

Questions about Rich Text

What does Rich Text do?

Software Mansion's best practices for rich text in React Native using react-native-enriched and react-native-enriched-markdown. Rich Text is an agent skill from kingstinct/react-native-healthkit. Software Mansion's best practices for rich text in React Native using react-native-enriched and react-native-enriched-markdown.

When should I use Rich Text?

Rich Text fits situations like: building rich text editors; formatted text inputs; markdown renderers; any feature requiring inline styling.

How do I install Rich Text in Claude Code?

Run `npx skills add kingstinct/react-native-healthkit --skill rich-text -a claude-code`. Or copy the skill folder (.agents/skills/react-native-best-practices/references/rich-text in kingstinct/react-native-healthkit) into .claude/skills/rich-text in your project. Claude Code loads it when a task matches its description.

How do I install Rich Text in Codex?

Run `npx skills add kingstinct/react-native-healthkit --skill rich-text -a codex`. Or copy the skill folder (.agents/skills/react-native-best-practices/references/rich-text in kingstinct/react-native-healthkit) into .agents/skills/rich-text in your project. Codex loads it when a task matches its description.

Can I use Rich Text in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kingstinct/react-native-healthkit --skill rich-text -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rich-text, .gemini/skills/rich-text, .github/skills/rich-text and .opencode/skills/rich-text in your project.

What does Rich Text need to run?

Going by SKILL.md and its folder, Rich Text needs the command-line tools its instructions call (npm). Our summary lists: Node.js.

Does Rich Text access the network?

SKILL.md names 2 domains. In commands or code: reactnative.dev; the agent is likely to contact it when it follows the instructions. As links in the text: github.com. This is read from the text; nothing was executed.

Is Rich Text safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rich Text use?

Rich Text is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rich Text use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rich Text?

Skills that share tags, products or a category with Rich Text: Rich Text (software-mansion-labs/skills, 291 stars), Rnn Codebase (wix/react-native-navigation, 13k stars), Ios26 Navigation (wix/react-native-navigation, 13k stars) and App Store Review (safaiyeh/app-store-review-skill, 362 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rich Text?

kingstinct (a GitHub organization) maintains it in kingstinct/react-native-healthkit, which has 716 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 7, 2026.

Source: kingstinct/react-native-healthkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.