# Text Animation — React Native component for Expo

> Reveal, shimmer, cascade, scramble and typewriter text effects.

Five text effects in one component: words rising on a soft spring, a looping shimmer for "Thinking…" states, letters rolling between values, a glyph scramble and a typewriter with a caret. Everything staggers letter by letter on the native driver, and screen readers still hear one clean string.

- Docs: https://expokit.in/docs/components/text-animation
- Tier: Free
- Also called: typewriter effect, animated text, shimmer text, text reveal
- Category: Motion
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- Uses ExpoKit items: kit
- Variants: Reveal, Thinking, Deploy Status, Scramble, Streaming, Hero

## Installation

Run once per project: `npx @expokit/cli@latest init` (shared theme + KitProvider). Then:

```bash
npx @expokit/cli@latest add text-animation
```

The CLI copies the source into your project (you own the code).

Import: `import { AnimatedText } from "@/components/ui/text-animation";`

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `string` | — | The text to animate. |
| `variant` | `"reveal" \| "shimmer" \| "cascade" \| "scramble" \| "typewriter"` | `"reveal"` | Which effect to play. |
| `trigger` | `"mount" \| "change"` | `"change" for cascade / typewriter, else "mount"` | Animate once on mount, or also every time the text changes. A typewriter keeps typing when the new text extends the old (streaming). |
| `delay` | `number` | `0` | ms before the first animation. |
| `stagger` | `number` | `70 reveal · 80 shimmer · 28 cascade · 45 scramble · 32 typewriter` | ms between words (reveal) or letters. Shimmer: ms of sweep per letter. |
| `speed` | `number` | `1` | Speed multiplier: 2 plays twice as fast. |
| `color` | `string` | `theme foreground` | Text colour. |
| `caret` | `boolean` | `true` | Blinking caret for the typewriter. |
| `replayKey` | `string \| number` | — | Change it to replay the animation. |
| `onComplete` | `() => void` | — | Called when an animation finishes (not for the looping shimmer). |
| `textStyle` | `StyleProp<TextStyle>` | — | fontSize, fontWeight, lineHeight, letterSpacing, textAlign… for every letter. |
| `style` | `StyleProp<ViewStyle>` | — | Style for the root view. |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |

## Behaviour & accessibility

- **Motion**: Reveal, shimmer and cascade run one native-driver clock per animation with spring curves pre-sampled into interpolations; scramble and typewriter use a light JS timer. Text wraps by word.
- **Reduced motion**: Shows the final text immediately; shimmer stays static and the typewriter caret is hidden.
- **Screen readers**: The whole string is one text element; the per-letter views are hidden. Cascade and typewriter announce new text when it changes (typewriter once streaming settles).
- **Platforms**: iOS, Android and web. Arabic, Hebrew, Indic, Thai and other connected scripts animate a word at a time so shaping is never broken; right-to-left text flows from the right.

## FAQ

### How do I make a typewriter effect in React Native?

Use ExpoKit's Text Animation: run npx @expokit/cli@latest add text-animation in your Expo or React Native project and it copies a ready-made typewriter effect into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Text Animation work in Expo Go?

Yes. Text Animation runs in Expo Go on iOS and Android with no development build.

### How do I add Text Animation to my Expo app?

Run npx @expokit/cli@latest add text-animation in your project. The CLI copies the component's source into your app, so the code is yours to change.

### Is Text Animation free?

Yes. Text Animation is free: its full source is on this page and the CLI installs it without an account.

### Can I change how Text Animation looks?

Yes. It takes its colours, radius and light / dark mode from useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.

## More

- Live preview, variants and code: https://expokit.in/docs/components/text-animation
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
