Description:
Expo Animated Streaming Text is a React Native Markdown renderer distributed as an Expo source project.
Incoming words fade into place with a color trail, and a FlashList-based variant follows streaming replies while rendering blocks lazily.
Preview
Run the Demo
git clone https://github.com/rit3zh/expo-animated-streaming-text
cd expo-animated-streaming-text
bun install
bun run start --clearRender an Incoming Reply
Use the renderer in src/components/streaming-text. Append incoming chunks to your accumulated Markdown string and pass it as children.
Keep streaming true during the response, then set it to false when the stream ends. For stored history, set animate={false} to render text immediately:
import { StreamingText } from "@/components/streaming-text";
type ReplyProps = {
text: string;
streaming: boolean;
};
export function Reply({ text, streaming }: ReplyProps) {
return (
<StreamingText streaming={streaming}>
{text}
</StreamingText>
);
}Follow Long Replies
Dragging detaches follow mode; scrolling near the bottom reattaches it. onRevealEnd fires after streaming ends and the final word finishes its reveal.
StreamingTextList accepts FlashList props except data, renderItem, and children. Give its parent a bounded height, such as a full-height screen:
import { View } from "react-native";
import { StreamingTextList } from "@/components/streaming-text";
export function ReplyScreen({ text, streaming }: { text: string; streaming: boolean }) {
return (
<View style={{ flex: 1 }}>
<StreamingTextList
streaming={streaming}
contentContainerStyle={{ padding: 16 }}
onRevealEnd={() => console.log("Reply revealed")}
>
{text}
</StreamingTextList>
</View>
);
}Animation and Scroll Options
| Prop | Default | Behavior |
|---|---|---|
children | Required | Accumulated Markdown string |
style | Unset | Container styling |
streaming | false | More Markdown is arriving |
animate | true | Word fade animation |
wordMs | 16 | Minimum interval between words |
fadeMs | 1500 | Fade duration per word |
trailMs | 2000 | Color trail duration |
trailColors | Violet-to-gray palette | Custom colors, or false to disable |
onLinkPress | Opens the browser | Custom link handler receiving the URL |
StreamingTextList Options
The list accepts the rendering options above and forwards its layout styles through FlashList.
| Prop | Default | Behavior |
|---|---|---|
follow | true | List-only automatic bottom following |
followGlideMs | 200 | List-only scroll glide duration |
followInset | Unset | List-only Reanimated DerivedValue<number> bottom inset |
onRevealEnd | Unset | Callback after streaming ends and the reveal finishes |
Markdown and Theme Configuration
The renderer accepts headings, emphasis, strikethrough, links, inline code, blockquotes, ordered lists, unordered lists, task lists, tables, rules, and fenced code blocks.
Use parseMarkdown(text, { streaming: true }) when consuming parsed blocks directly. Streaming mode closes unfinished syntax such as bold markers, inline-code markers, and link openings.
Edit src/constants/components/streaming-text.const.ts for light and dark palettes, timing, supported languages, and the vitesse-light and vitesse-dark Shiki themes.





