SwipeUI

Text reveal

A restrained staggered line with whole-run shaping fallbacks.

npx @swipeui/cli add text-reveal
Variant
Preset
Material
Scheme
Feel
Real free component with a browser animation bridge. Native motion, haptics and materials need a device.

When to use it

  • Onboarding headlines or welcome messages that appear word by word.
  • Section titles on a landing screen that reveal when shown.
  • Quiet emphasis for one important line.

When not to use it

  • Body text or anything people need to read quickly.
  • Repeated UI labels; it gets tiring.
  • Long lines.

Installation

Run this from your app's root. If SwipeUI isn't set up yet, run npx @swipeui/cli init first; it sets up Uniwind, the theme tokens and the cn helper.

npx @swipeui/cli add text-reveal
  • Adds components/swipeui/ui/text-reveal.tsx and 4 shared helpers.
  • Installs react-native-reanimated, react-native-worklets, clsx, tailwind-merge, class-variance-authority. In Expo apps it uses npx expo install so versions match your SDK.

Usage

app/onboarding.tsx
import { TextReveal } from '@/components/swipeui/ui/text-reveal';

<TextReveal text="Make room for what matters" />;

Examples

word, character, line. The app and website share content, named boards and compact outside controls.

Settings

SettingDefaultBehavior
textrequiredComplete visible and spoken text.
by'word''word', 'character' or newline-delimited 'line'. Shaped scripts stay whole.
direction'up'Enter from below, above ('down'), or fade in place ('none').
delay0Nonnegative finite milliseconds before the first segment.
onRevealEndabsentCalled once after the last entrance finishes, including the reduced-motion fade.
visibletrueMount and reveal the text.
motionapp feelShared list/fade feel.
classNameabsentRoot classes.
textClassName'text-title-2'Text style classes.
styleabsentNative layout escape hatch.
testIDabsentRoot and segment IDs.

Accessibility

The complete text is one accessible label; animated copies are hidden. Shaped scripts stay whole. Reduce Motion preserves the meaning. Native screen-reader, Dynamic Type and performance checks remain pending at 7.9.

Behavior and gestures

  • Add explicit line reveal, independent direction and delay, and one completion callback. Shaped scripts stay whole; Reduce Motion keeps a completion fade.
  • The application owns its content; demo controls sit outside the item.

Accessibility

  • The full line is read once, not piece by piece.
  • Joined scripts are revealed as a whole so letters keep their shapes.
  • Reduce Motion shows the line at once.

Motion

  • Uses the list motion role, so it follows your app's feel. Pass motion to tune this one instance.
  • Add explicit line reveal, independent direction and delay, and one completion callback. Shaped scripts stay whole; Reduce Motion keeps a completion fade.
  • Native runtime evidence remains pending at 7.9.

Performance

  • Each word or character is a small animated view; keep it to one line.

Notes for AI

  • Use by="word" for most text; characters only for very short lines.

Compatibility

Runs onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items