Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

streamdown-native

Streaming Markdown for React Native, with native semantics, incremental rendering, explicit security boundaries, and opt-in rich-content adapters.

Current release: This branch documents npm 0.1.2.

Install

npm install streamdown-native
npx expo install react-native-svg

Bare React Native apps can install the tested SVG peer directly:

npm install react-native-svg@">=15.12.1 <16.0.0"
cd ios && pod install

The package requires React 19 and React Native ^0.81.0 || ^0.85.0. The host owns react-native-svg so Expo or React Native can select the compatible native version.

0.1.0 requires React Native's New Architecture (Fabric). Animated prose is rendered by the package's autolinked iOS and Android text component, so Expo projects must use a development or production native build. Expo Go is not supported.

Quick start

import React from 'react';
import { Streamdown } from 'streamdown-native';

export function Message({ markdown, done }: { markdown: string; done: boolean }) {
  return (
    <Streamdown
      mode="streaming"
      animated
      isAnimating={!done}
      isComplete={done}
      theme="dark"
    >
      {markdown}
    </Streamdown>
  );
}

Use mode="static" for complete documents. StreamdownRN and the default export are aliases of Streamdown.

Sample app

The Expo 56 sample app exercises native fadeIn and slideUp streaming at multiple chunk rates, static rendering, themes, tables, task lists, code, math, Mermaid, CJK/RTL text, incomplete Markdown, native actions, and long-stream performance.

bun install
bun run sample:android
# or
bun run sample:ios

The commands launch self-contained Release/Hermes builds, so they do not depend on Metro. Each run recreates the ignored .sample/expo56 workspace and packs the current library source, preventing stale native or JavaScript bundles from hiding local changes.

See examples, screenshots, video, and performance graphs for the recorded iOS showcase and reproducible metrics.

Features

  • CommonMark and GFM rendering with incomplete-stream repair and append-aware block caching.
  • Native-frame fadeIn and slideUp token animation for prose, with Unicode grapheme-safe word/character segmentation and Reduce Motion support.
  • Native headings, lists, tables, links, images, task controls, focus, and accessibility semantics.
  • Light, dark, and custom semantic themes.
  • Capability-backed clipboard, file, share, link approval, focus, announcement, and gesture actions.
  • Optional code, cjk, renderers, math, mermaid, and mermaid/webview entry points.
  • Typed semantic slots plus compatibility support for custom components.
  • Explicit input limits, URL sanitization, and host-controlled native side effects.

Documentation

Verify

bun install --frozen-lockfile --ignore-scripts
bun run type-check
bun run test
bun run pack:verify

The full parity and release gates require the pinned Vercel Streamdown checkout and candidate-bound device evidence. See release gates for the exact process.

Credits

This project builds on work from:

Thank you to the maintainers and contributors of each project. See NOTICE and third-party notices for license details.

License

Apache-2.0. See LICENSE.

About

Streaming Markdown renderer for React Native with native semantics, security controls, and opt-in rich-content adapters.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages