nativebits-animated-text 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +564 -2
  3. package/docs/android-demo.gif +0 -0
  4. package/lib/commonjs/index.js +146 -0
  5. package/lib/commonjs/index.js.map +1 -0
  6. package/lib/commonjs/package.json +1 -0
  7. package/lib/commonjs/text/BlurText.js +146 -0
  8. package/lib/commonjs/text/BlurText.js.map +1 -0
  9. package/lib/commonjs/text/BounceText.js +83 -0
  10. package/lib/commonjs/text/BounceText.js.map +1 -0
  11. package/lib/commonjs/text/CountUpText.js +77 -0
  12. package/lib/commonjs/text/CountUpText.js.map +1 -0
  13. package/lib/commonjs/text/ElasticText.js +85 -0
  14. package/lib/commonjs/text/ElasticText.js.map +1 -0
  15. package/lib/commonjs/text/ExplosionText.js +191 -0
  16. package/lib/commonjs/text/ExplosionText.js.map +1 -0
  17. package/lib/commonjs/text/FlipText.js +101 -0
  18. package/lib/commonjs/text/FlipText.js.map +1 -0
  19. package/lib/commonjs/text/GlitchText.js +329 -0
  20. package/lib/commonjs/text/GlitchText.js.map +1 -0
  21. package/lib/commonjs/text/GradientText.js +73 -0
  22. package/lib/commonjs/text/GradientText.js.map +1 -0
  23. package/lib/commonjs/text/MorphText.js +192 -0
  24. package/lib/commonjs/text/MorphText.js.map +1 -0
  25. package/lib/commonjs/text/NeonText.js +134 -0
  26. package/lib/commonjs/text/NeonText.js.map +1 -0
  27. package/lib/commonjs/text/ParticleText.js +328 -0
  28. package/lib/commonjs/text/ParticleText.js.map +1 -0
  29. package/lib/commonjs/text/RevealText.js +142 -0
  30. package/lib/commonjs/text/RevealText.js.map +1 -0
  31. package/lib/commonjs/text/RotateText.js +99 -0
  32. package/lib/commonjs/text/RotateText.js.map +1 -0
  33. package/lib/commonjs/text/ScrambleText.js +82 -0
  34. package/lib/commonjs/text/ScrambleText.js.map +1 -0
  35. package/lib/commonjs/text/ShinyText.js +87 -0
  36. package/lib/commonjs/text/ShinyText.js.map +1 -0
  37. package/lib/commonjs/text/SplitText.js +81 -0
  38. package/lib/commonjs/text/SplitText.js.map +1 -0
  39. package/lib/commonjs/text/TextWave.js +130 -0
  40. package/lib/commonjs/text/TextWave.js.map +1 -0
  41. package/lib/commonjs/text/ThreeDText.js +145 -0
  42. package/lib/commonjs/text/ThreeDText.js.map +1 -0
  43. package/lib/commonjs/text/TypewriterText.js +119 -0
  44. package/lib/commonjs/text/TypewriterText.js.map +1 -0
  45. package/lib/commonjs/text/WaveText.js +79 -0
  46. package/lib/commonjs/text/WaveText.js.map +1 -0
  47. package/lib/module/index.js +23 -0
  48. package/lib/module/index.js.map +1 -0
  49. package/lib/module/text/BlurText.js +139 -0
  50. package/lib/module/text/BlurText.js.map +1 -0
  51. package/lib/module/text/BounceText.js +77 -0
  52. package/lib/module/text/BounceText.js.map +1 -0
  53. package/lib/module/text/CountUpText.js +70 -0
  54. package/lib/module/text/CountUpText.js.map +1 -0
  55. package/lib/module/text/ElasticText.js +78 -0
  56. package/lib/module/text/ElasticText.js.map +1 -0
  57. package/lib/module/text/ExplosionText.js +184 -0
  58. package/lib/module/text/ExplosionText.js.map +1 -0
  59. package/lib/module/text/FlipText.js +94 -0
  60. package/lib/module/text/FlipText.js.map +1 -0
  61. package/lib/module/text/GlitchText.js +322 -0
  62. package/lib/module/text/GlitchText.js.map +1 -0
  63. package/lib/module/text/GradientText.js +66 -0
  64. package/lib/module/text/GradientText.js.map +1 -0
  65. package/lib/module/text/MorphText.js +185 -0
  66. package/lib/module/text/MorphText.js.map +1 -0
  67. package/lib/module/text/NeonText.js +127 -0
  68. package/lib/module/text/NeonText.js.map +1 -0
  69. package/lib/module/text/ParticleText.js +321 -0
  70. package/lib/module/text/ParticleText.js.map +1 -0
  71. package/lib/module/text/RevealText.js +135 -0
  72. package/lib/module/text/RevealText.js.map +1 -0
  73. package/lib/module/text/RotateText.js +93 -0
  74. package/lib/module/text/RotateText.js.map +1 -0
  75. package/lib/module/text/ScrambleText.js +76 -0
  76. package/lib/module/text/ScrambleText.js.map +1 -0
  77. package/lib/module/text/ShinyText.js +80 -0
  78. package/lib/module/text/ShinyText.js.map +1 -0
  79. package/lib/module/text/SplitText.js +74 -0
  80. package/lib/module/text/SplitText.js.map +1 -0
  81. package/lib/module/text/TextWave.js +123 -0
  82. package/lib/module/text/TextWave.js.map +1 -0
  83. package/lib/module/text/ThreeDText.js +138 -0
  84. package/lib/module/text/ThreeDText.js.map +1 -0
  85. package/lib/module/text/TypewriterText.js +113 -0
  86. package/lib/module/text/TypewriterText.js.map +1 -0
  87. package/lib/module/text/WaveText.js +72 -0
  88. package/lib/module/text/WaveText.js.map +1 -0
  89. package/lib/typescript/index.d.ts +41 -0
  90. package/lib/typescript/index.d.ts.map +1 -0
  91. package/lib/typescript/text/BlurText.d.ts +16 -0
  92. package/lib/typescript/text/BlurText.d.ts.map +1 -0
  93. package/lib/typescript/text/BounceText.d.ts +15 -0
  94. package/lib/typescript/text/BounceText.d.ts.map +1 -0
  95. package/lib/typescript/text/CountUpText.d.ts +20 -0
  96. package/lib/typescript/text/CountUpText.d.ts.map +1 -0
  97. package/lib/typescript/text/ElasticText.d.ts +17 -0
  98. package/lib/typescript/text/ElasticText.d.ts.map +1 -0
  99. package/lib/typescript/text/ExplosionText.d.ts +23 -0
  100. package/lib/typescript/text/ExplosionText.d.ts.map +1 -0
  101. package/lib/typescript/text/FlipText.d.ts +17 -0
  102. package/lib/typescript/text/FlipText.d.ts.map +1 -0
  103. package/lib/typescript/text/GlitchText.d.ts +19 -0
  104. package/lib/typescript/text/GlitchText.d.ts.map +1 -0
  105. package/lib/typescript/text/GradientText.d.ts +12 -0
  106. package/lib/typescript/text/GradientText.d.ts.map +1 -0
  107. package/lib/typescript/text/MorphText.d.ts +18 -0
  108. package/lib/typescript/text/MorphText.d.ts.map +1 -0
  109. package/lib/typescript/text/NeonText.d.ts +16 -0
  110. package/lib/typescript/text/NeonText.d.ts.map +1 -0
  111. package/lib/typescript/text/ParticleText.d.ts +23 -0
  112. package/lib/typescript/text/ParticleText.d.ts.map +1 -0
  113. package/lib/typescript/text/RevealText.d.ts +19 -0
  114. package/lib/typescript/text/RevealText.d.ts.map +1 -0
  115. package/lib/typescript/text/RotateText.d.ts +17 -0
  116. package/lib/typescript/text/RotateText.d.ts.map +1 -0
  117. package/lib/typescript/text/ScrambleText.d.ts +14 -0
  118. package/lib/typescript/text/ScrambleText.d.ts.map +1 -0
  119. package/lib/typescript/text/ShinyText.d.ts +15 -0
  120. package/lib/typescript/text/ShinyText.d.ts.map +1 -0
  121. package/lib/typescript/text/SplitText.d.ts +28 -0
  122. package/lib/typescript/text/SplitText.d.ts.map +1 -0
  123. package/lib/typescript/text/TextWave.d.ts +15 -0
  124. package/lib/typescript/text/TextWave.d.ts.map +1 -0
  125. package/lib/typescript/text/ThreeDText.d.ts +24 -0
  126. package/lib/typescript/text/ThreeDText.d.ts.map +1 -0
  127. package/lib/typescript/text/TypewriterText.d.ts +21 -0
  128. package/lib/typescript/text/TypewriterText.d.ts.map +1 -0
  129. package/lib/typescript/text/WaveText.d.ts +14 -0
  130. package/lib/typescript/text/WaveText.d.ts.map +1 -0
  131. package/package.json +48 -4
  132. package/src/index.ts +45 -0
  133. package/src/text/BlurText.tsx +243 -0
  134. package/src/text/BounceText.tsx +158 -0
  135. package/src/text/CountUpText.tsx +153 -0
  136. package/src/text/ElasticText.tsx +143 -0
  137. package/src/text/ExplosionText.tsx +242 -0
  138. package/src/text/FlipText.tsx +161 -0
  139. package/src/text/GlitchText.tsx +525 -0
  140. package/src/text/GradientText.tsx +118 -0
  141. package/src/text/MorphText.tsx +305 -0
  142. package/src/text/NeonText.tsx +205 -0
  143. package/src/text/ParticleText.tsx +489 -0
  144. package/src/text/RevealText.tsx +255 -0
  145. package/src/text/RotateText.tsx +179 -0
  146. package/src/text/ScrambleText.tsx +137 -0
  147. package/src/text/ShinyText.tsx +163 -0
  148. package/src/text/SplitText.tsx +122 -0
  149. package/src/text/TextWave.tsx +223 -0
  150. package/src/text/ThreeDText.tsx +268 -0
  151. package/src/text/TypewriterText.tsx +189 -0
  152. package/src/text/WaveText.tsx +132 -0
package/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 NativeBits contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
package/README.md CHANGED
@@ -1,3 +1,565 @@
1
- # Temporary Holding Version
1
+ # NativeBits
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Animated text for React Native. Reveal a heading character by character, cycle through phrases, add a gradient or neon glow, scatter letters, or count up to a number. NativeBits includes 20 components and exports their TypeScript prop types.
4
+
5
+ Try all 20 effects in the [NativeBits demo app for React Native](https://github.com/Rojithmuthaiya/nativebits-demo). The demo includes editable sample text, presets, and replay controls.
6
+
7
+ ![Android demo showing ExplosionText burst, reassemble, and loop](./docs/android-demo.gif)
8
+
9
+ - [Installation](#installation)
10
+ - [Quick start](#quick-start)
11
+ - [Component reference](#component-reference)
12
+ - [Troubleshooting](#troubleshooting)
13
+
14
+ ## Installation
15
+
16
+ Install NativeBits and its peer dependencies **in your React Native app**.
17
+
18
+ | Dependency | NativeBits peer requirement |
19
+ | --- | --- |
20
+ | React | 19 or later |
21
+ | React Native | 0.79 or later with the New Architecture enabled |
22
+ | React Native Reanimated | 4.x, starting at 4.1.0 |
23
+ | React Native Worklets | 0.7.0 or later |
24
+ | Shopify React Native Skia | 2.14.0 or later |
25
+
26
+ These are package requirements. Choose versions that also work together with your React Native version or Expo SDK. Reanimated and Worklets handle animations, and Skia draws canvas effects such as gradients, glow, and particles. Install all three for the public package entry point. [Reanimated compatibility table](https://docs.swmansion.com/react-native-reanimated/docs/guides/compatibility/) · [Skia installation](https://wcandillon.github.io/react-native-skia/v2/docs/getting-started/installation/)
27
+
28
+ The Android demo uses React Native 0.88.1, React 19.3.0, Reanimated 4.7.1, Worklets 0.13.1, and Skia 2.14.0. iOS playback has yet to be verified.
29
+
30
+ ### Expo
31
+
32
+ Use an Expo SDK whose compatible dependencies meet the versions above.
33
+
34
+ ```sh
35
+ npx expo install react-native-reanimated react-native-worklets @shopify/react-native-skia
36
+ npm install nativebits-animated-text
37
+ npx expo start --clear
38
+ ```
39
+
40
+ The standard `babel-preset-expo` configures the Worklets plugin automatically. If you use a custom development build, rebuild it after adding or upgrading native dependencies. For Expo Go, use a client with the matching native dependency versions. [Expo Reanimated guide](https://docs.expo.dev/versions/latest/sdk/reanimated/) · [Expo Skia guide](https://docs.expo.dev/versions/latest/sdk/skia/)
41
+
42
+ ### React Native Community CLI
43
+
44
+ For the React Native 0.88.1 setup shown in the demo, install these versions. For a different React Native version, check compatibility before choosing your pins.
45
+
46
+ ```sh
47
+ npm install react-native-reanimated@4.7.1 react-native-worklets@0.13.1 @shopify/react-native-skia@2.14.0
48
+ npm install nativebits-animated-text
49
+ ```
50
+
51
+ Add `react-native-worklets/plugin` as the **last** plugin in your app's `babel.config.js`. Keep any Babel presets and plugins your app already uses.
52
+
53
+ ```js
54
+ module.exports = {
55
+ presets: ['module:@react-native/babel-preset'],
56
+ plugins: ['react-native-worklets/plugin'],
57
+ };
58
+ ```
59
+
60
+ For iOS, run `npx pod-install` from the app root on macOS. Restart Metro with a clean cache and rebuild the native app. [Reanimated Community CLI guide](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/#react-native-community-cli)
61
+
62
+ ```sh
63
+ npm start -- --reset-cache
64
+ ```
65
+
66
+ In a second terminal, use `npm run android` for Android or `npm run ios` on macOS in a standard Community CLI project.
67
+
68
+ ## Quick start
69
+
70
+ ```tsx
71
+ import React from 'react';
72
+ import { View } from 'react-native';
73
+ import { SplitText, type SplitTextProps } from 'nativebits-animated-text';
74
+
75
+ const heading: SplitTextProps = {
76
+ text: 'Welcome to NativeBits',
77
+ duration: 450,
78
+ stagger: 35,
79
+ fromY: 16,
80
+ style: { fontSize: 28, fontWeight: '700', color: '#171717' },
81
+ };
82
+
83
+ export default function App() {
84
+ return (
85
+ <View style={{ flex: 1, justifyContent: 'center', padding: 24 }}>
86
+ <SplitText {...heading} />
87
+ </View>
88
+ );
89
+ }
90
+ ```
91
+
92
+ ## Component reference
93
+
94
+ Import the component used in each example from `nativebits-animated-text`. Each has a corresponding named prop type such as `ExplosionTextProps`. Required inputs are marked in the tables. Timing values are in milliseconds and layout distances are in React Native layout points unless specified.
95
+
96
+ | Effect | Components |
97
+ | --- | --- |
98
+ | Reveals and phrase transitions | [SplitText](#splittext), [BlurText](#blurtext), [RevealText](#revealtext), [TypewriterText](#typewritertext), [ScrambleText](#scrambletext), [RotateText](#rotatetext), [FlipText](#fliptext), [MorphText](#morphtext) |
99
+ | Color and lighting | [GradientText](#gradienttext), [ShinyText](#shinytext), [NeonText](#neontext), [ThreeDText](#threedtext), [GlitchText](#glitchtext) |
100
+ | Motion and particles | [WaveText](#wavetext), [TextWave](#textwave), [BounceText](#bouncetext), [ElasticText](#elastictext), [ParticleText](#particletext), [ExplosionText](#explosiontext) |
101
+ | Numbers | [CountUpText](#countuptext) |
102
+
103
+ For Skia components, `style` controls the font options listed in each table. Use `containerStyle` for layout. Canvas colors come from the component's color props or the style fields listed in its table.
104
+
105
+ ### SplitText
106
+
107
+ Slides and fades in each character in sequence.
108
+
109
+ ```tsx
110
+ <SplitText text="Welcome aboard" fromY={24} stagger={45} />
111
+ ```
112
+
113
+ | Prop | Type | Default | Description |
114
+ | --- | --- | --- | --- |
115
+ | `text` | `string` | **Required** | Text to reveal. |
116
+ | `duration` | `number` | `450` | Animation time per character. |
117
+ | `stagger` | `number` | `35` | Time between character starts. |
118
+ | `delay` | `number` | `0` | Wait before the first character starts. |
119
+ | `fromY` | `number` | `16` | Initial vertical offset. Positive values start below the resting position. |
120
+ | `style` | `StyleProp<TextStyle>` | — | Base style applied to each character. |
121
+ | `characterStyle` | `StyleProp<TextStyle>` | — | Per-character style applied after the base style. |
122
+ | `containerStyle` | `StyleProp<ViewStyle>` | — | Wrapping container style. |
123
+
124
+ ### BlurText
125
+
126
+ Slides characters into focus using a Skia blur.
127
+
128
+ ```tsx
129
+ <BlurText text="Coming into focus" blur={14} fromY={12} />
130
+ ```
131
+
132
+ | Prop | Type | Default | Description |
133
+ | --- | --- | --- | --- |
134
+ | `text` | `string` | **Required** | Text to bring into focus. |
135
+ | `duration` | `number` | `600` | Animation time per character. |
136
+ | `stagger` | `number` | `50` | Time between character starts. |
137
+ | `delay` | `number` | `0` | Wait before the first character starts. |
138
+ | `fromY` | `number` | `20` | Initial vertical offset. |
139
+ | `blur` | `number` | `10` | Starting blur radius. |
140
+ | `style` | `TextStyle` | — | Canvas font size, family, weight, font style, and sharp text color. |
141
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
142
+ | `blurColor` | `string` | Text color | Color of the blurred text layer. |
143
+ | `blurGradient` | `string[]` | — | Optional gradient for the blur layer. Supply at least two colors. |
144
+
145
+ ### RevealText
146
+
147
+ Uncovers text with a directional wipe. It can reveal characters or whole words.
148
+
149
+ ```tsx
150
+ <RevealText text="One word at a time" mode="word" direction="bottom" slide />
151
+ ```
152
+
153
+ | Prop | Type | Default | Description |
154
+ | --- | --- | --- | --- |
155
+ | `text` | `string` | **Required** | Text to reveal. |
156
+ | `direction` | `'left' \| 'right' \| 'top' \| 'bottom'` | `'left'` | Edge where the reveal begins. |
157
+ | `duration` | `number` | `700` | Animation time per character or word. |
158
+ | `delay` | `number` | `0` | Wait before the reveal starts. |
159
+ | `stagger` | `number` | `45` | Time between character or word starts. |
160
+ | `mode` | `'word' \| 'character'` | `'character'` | Unit to reveal at each step. |
161
+ | `fade` | `boolean` | `true` | Fade in each unit during the wipe. |
162
+ | `slide` | `boolean` | `false` | Slide each unit as it is revealed. |
163
+ | `slideDistance` | `number` | `20` | Travel distance when slide is enabled. |
164
+ | `loop` | `boolean` | `false` | Repeat the reveal. |
165
+ | `style` | `TextStyle` | — | Base text style. |
166
+ | `characterStyle` | `TextStyle` | — | Additional style for each animated character or word. |
167
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
168
+
169
+ ### TypewriterText
170
+
171
+ Types and erases phrases with a customizable cursor. With looping disabled, the final phrase stays visible.
172
+
173
+ ```tsx
174
+ <TypewriterText texts={['Build it.', 'Animate it.']} cursorColor="#7C3AED" loop />
175
+ ```
176
+
177
+ | Prop | Type | Default | Description |
178
+ | --- | --- | --- | --- |
179
+ | `texts` | `string[]` | **Required** | Phrases to type in order. |
180
+ | `typingSpeed` | `number` | `80` | Time between typing steps. |
181
+ | `deletingSpeed` | `number` | `40` | Time between deletion steps. |
182
+ | `pauseDuration` | `number` | `1500` | Time to hold a phrase before erasing it. |
183
+ | `loop` | `boolean` | `false` | Start over after the final phrase. |
184
+ | `cursorWidth` | `number` | `2` | Cursor width. |
185
+ | `cursorHeight` | `number` | `26` | Cursor height. |
186
+ | `cursorColor` | `string` | `'#FFFFFF'` | Cursor fill color. |
187
+ | `cursorBorderRadius` | `number` | `2` | Cursor corner radius. |
188
+ | `cursorMarginLeft` | `number` | `3` | Space between the text and cursor. |
189
+ | `cursorAnimation` | `'blink' \| 'pulse' \| 'none'` | `'blink'` | Cursor opacity animation. |
190
+ | `cursorAnimationDuration` | `number` | `500` | Duration of a cursor animation step. |
191
+ | `style` | `TextStyle` | — | Typed text style. |
192
+ | `cursorStyle` | `ViewStyle` | — | Additional cursor style. |
193
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
194
+
195
+ ### ScrambleText
196
+
197
+ Replaces random characters with the final text from left to right.
198
+
199
+ ```tsx
200
+ <ScrambleText text="ACCESS GRANTED" characters="01#$" speed={45} />
201
+ ```
202
+
203
+ | Prop | Type | Default | Description |
204
+ | --- | --- | --- | --- |
205
+ | `text` | `string` | **Required** | Final text to reveal. |
206
+ | `characters` | `string` | `'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*'` | Pool of characters used for scrambling. |
207
+ | `speed` | `number` | `50` | Time between reveal steps. |
208
+ | `delay` | `number` | `0` | Wait before the first reveal step. |
209
+ | `pauseDuration` | `number` | `1500` | Time to hold the revealed text before scrambling again. |
210
+ | `loop` | `boolean` | `false` | Repeat the scramble. |
211
+ | `style` | `TextStyle` | — | Text style. |
212
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
213
+
214
+ ### RotateText
215
+
216
+ Rotates each character into view around the X, Y, or Z axis.
217
+
218
+ ```tsx
219
+ <RotateText text="Turn the page" axis="z" rotation={45} />
220
+ ```
221
+
222
+ | Prop | Type | Default | Description |
223
+ | --- | --- | --- | --- |
224
+ | `text` | `string` | **Required** | Text to rotate. |
225
+ | `duration` | `number` | `700` | Animation time per character. |
226
+ | `stagger` | `number` | `50` | Time between character starts. |
227
+ | `delay` | `number` | `0` | Wait before the first character starts. |
228
+ | `rotation` | `number` | `90` | Starting angle in degrees. |
229
+ | `axis` | `'x' \| 'y' \| 'z'` | `'y'` | Rotation axis. |
230
+ | `perspective` | `number` | `600` | Perspective distance for the transform. |
231
+ | `loop` | `boolean` | `false` | Repeat the effect. |
232
+ | `style` | `TextStyle` | — | Base text style. |
233
+ | `characterStyle` | `TextStyle` | — | Additional per-character style. |
234
+ | `containerStyle` | `ViewStyle` | — | Wrapping container style. |
235
+
236
+ ### FlipText
237
+
238
+ Flips characters into view with perspective and a staggered entrance.
239
+
240
+ ```tsx
241
+ <FlipText text="Fresh start" axis="y" stagger={85} />
242
+ ```
243
+
244
+ | Prop | Type | Default | Description |
245
+ | --- | --- | --- | --- |
246
+ | `text` | `string` | **Required** | Text to flip. |
247
+ | `duration` | `number` | `600` | Animation time per character. |
248
+ | `stagger` | `number` | `60` | Time between character starts. |
249
+ | `delay` | `number` | `0` | Wait before the first character starts. |
250
+ | `rotation` | `number` | `90` | Starting angle in degrees. |
251
+ | `axis` | `'x' \| 'y'` | `'x'` | Flip axis. |
252
+ | `perspective` | `number` | `600` | Perspective distance for the transform. |
253
+ | `loop` | `boolean` | `false` | Repeat the effect. |
254
+ | `style` | `TextStyle` | — | Base text style. |
255
+ | `characterStyle` | `TextStyle` | — | Additional per-character style. |
256
+ | `containerStyle` | `ViewStyle` | — | Wrapping container style. |
257
+
258
+ ### MorphText
259
+
260
+ Cycles through words using staggered character entrances and exits.
261
+
262
+ ```tsx
263
+ <MorphText words={['Imagine', 'Build', 'Ship']} pauseDuration={1000} />
264
+ ```
265
+
266
+ | Prop | Type | Default | Description |
267
+ | --- | --- | --- | --- |
268
+ | `words` | `string[]` | **Required** | Words or phrases to display in order. |
269
+ | `duration` | `number` | `500` | Character transition duration. |
270
+ | `delay` | `number` | `0` | Initial wait before the first transition. |
271
+ | `stagger` | `number` | `35` | Time between character starts. |
272
+ | `pauseDuration` | `number` | `1200` | Time to hold a word before transitioning. |
273
+ | `loop` | `boolean` | `true` | Return to the first word after the last. |
274
+ | `enterFromY` | `number` | `16` | Starting vertical offset for incoming characters. |
275
+ | `exitToY` | `number` | `-16` | Ending vertical offset for outgoing characters. |
276
+ | `style` | `TextStyle` | — | Base text style. |
277
+ | `characterStyle` | `TextStyle` | — | Additional per-character style. |
278
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
279
+
280
+ ### GradientText
281
+
282
+ Sweeps a Skia gradient across the text.
283
+
284
+ ```tsx
285
+ <GradientText text="Golden hour" colors={['#FB7185', '#FBBF24', '#FDE68A']} />
286
+ ```
287
+
288
+ | Prop | Type | Default | Description |
289
+ | --- | --- | --- | --- |
290
+ | `text` | `string` | **Required** | Text to fill with the gradient. |
291
+ | `colors` | `string[]` | `['#8B5CF6', '#EC4899', '#F97316']` | Gradient stops in order. Supply at least two colors. |
292
+ | `duration` | `number` | `2500` | Time for one gradient pass. |
293
+ | `loop` | `boolean` | `true` | Repeat the gradient animation. |
294
+ | `style` | `TextStyle` | — | Canvas font size, family, weight, and font style. |
295
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
296
+
297
+ ### ShinyText
298
+
299
+ Passes a moving highlight over a base text color using Skia.
300
+
301
+ ```tsx
302
+ <ShinyText text="Premium" color="#64748B" shineColor="#E0F2FE" />
303
+ ```
304
+
305
+ | Prop | Type | Default | Description |
306
+ | --- | --- | --- | --- |
307
+ | `text` | `string` | **Required** | Text to highlight. |
308
+ | `color` | `string` | `'#808080'` | Base text color. |
309
+ | `shineColor` | `string` | `'#FFFFFF'` | Highlight color. |
310
+ | `duration` | `number` | `2000` | Time for one highlight pass. |
311
+ | `delay` | `number` | `0` | Wait before the highlight starts. |
312
+ | `loop` | `boolean` | `true` | Repeat the highlight pass. |
313
+ | `shineWidth` | `number` | `0.2` | Width of the highlight as a fraction of the gradient span. |
314
+ | `style` | `TextStyle` | — | Canvas font size, family, weight, and font style. |
315
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
316
+
317
+ ### NeonText
318
+
319
+ Draws neon lettering with a colored Skia glow and an optional pulse.
320
+
321
+ ```tsx
322
+ <NeonText text="OPEN LATE" neonColor="#22D3EE" glowRadius={18} />
323
+ ```
324
+
325
+ | Prop | Type | Default | Description |
326
+ | --- | --- | --- | --- |
327
+ | `text` | `string` | **Required** | Text to illuminate. |
328
+ | `neonColor` | `string` | `'#A855F7'` | Glow color. |
329
+ | `coreColor` | `string` | `'#FFFFFF'` | Color of the bright inner text. |
330
+ | `glowRadius` | `number` | `22` | Base glow radius. |
331
+ | `glowIntensity` | `number` | `1` | Glow strength, clamped to 0–1. |
332
+ | `pulse` | `boolean` | `true` | Animate the glow. |
333
+ | `duration` | `number` | `1500` | Duration of a pulse timing step. |
334
+ | `loop` | `boolean` | `true` | Repeat the pulse when enabled. |
335
+ | `style` | `TextStyle` | — | Canvas font size, family, weight, and font style. |
336
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
337
+
338
+ ### ThreeDText
339
+
340
+ Draws layered lettering in Skia with depth, bevel, shadow, and optional moving reflections.
341
+
342
+ ```tsx
343
+ <ThreeDText text="ARCADE" depth={12} rotationY={18} style={{ fontSize: 48 }} />
344
+ ```
345
+
346
+ | Prop | Type | Default | Description |
347
+ | --- | --- | --- | --- |
348
+ | `text` | `string` | **Required** | Text to render. |
349
+ | `color` | `string` | `style.color` or `'#A855F7'` | Base front-face color. |
350
+ | `depthColor` | `string` | `'#542080'` | Extrusion layer color. |
351
+ | `depth` | `number` | `16` | Number of extrusion layers, rounded down and clamped to 0–24. |
352
+ | `depthOffset` | `number` | `0.7` | Offset between extrusion layers. |
353
+ | `bevelSize` | `number` | `1` | Offset used for the bevel highlight. |
354
+ | `bevelColor` | `string` | `'#F5D0FE'` | Bevel highlight color. |
355
+ | `shadowColor` | `string` | `'#160824'` | Shadow color. |
356
+ | `gradientColors` | `string[]` | `['#F5D0FE', '#C084FC', '#7E22CE']` | Front-face gradient stops. The gradient is drawn when there are at least two colors. |
357
+ | `rotationX` | `number` | `8` | X-axis tilt in degrees. |
358
+ | `rotationY` | `number` | `12` | Y-axis tilt in degrees. |
359
+ | `perspective` | `number` | `800` | Perspective distance for the transform. |
360
+ | `duration` | `number` | `3000` | Time for one animation pass. |
361
+ | `animated` | `boolean` | `true` | Animate the tilt. |
362
+ | `loop` | `boolean` | `true` | Repeat the active animation. |
363
+ | `shine` | `boolean` | `true` | Enable the moving face highlight. Set both animated and shine to false for a static effect. |
364
+ | `style` | `TextStyle` | — | Canvas font size, family, weight, font style, and fallback face color. |
365
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
366
+
367
+ ### GlitchText
368
+
369
+ Creates a glitch effect using horizontal slices, color separation, and optional overlays.
370
+
371
+ ```tsx
372
+ <GlitchText text="SIGNAL LOST" intensity={0.55} scanlines flicker={false} />
373
+ ```
374
+
375
+ | Prop | Type | Default | Description |
376
+ | --- | --- | --- | --- |
377
+ | `text` | `string` | **Required** | Text to distort. |
378
+ | `intensity` | `number` | `0.9` | Glitch strength, clamped to 0–1. |
379
+ | `duration` | `number` | `600` | Base animation timing, with a 100 ms minimum. |
380
+ | `delay` | `number` | `0` | Initial wait before the effect. |
381
+ | `loop` | `boolean` | `true` | Repeat the effect. |
382
+ | `rgbSplit` | `boolean` | `true` | Enable colored channel offsets. |
383
+ | `noise` | `boolean` | `true` | Show the noise overlay. |
384
+ | `scanlines` | `boolean` | `false` | Show the scanline overlay. |
385
+ | `flicker` | `boolean` | `true` | Enable opacity flicker. |
386
+ | `slices` | `number` | `6` | Number of horizontal slices, rounded down and clamped to 1–12. |
387
+ | `style` | `TextStyle` | — | Text style. |
388
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
389
+
390
+ ### WaveText
391
+
392
+ Moves characters up and down in a staggered sequence.
393
+
394
+ ```tsx
395
+ <WaveText text="Hello, world!" amplitude={18} loop />
396
+ ```
397
+
398
+ | Prop | Type | Default | Description |
399
+ | --- | --- | --- | --- |
400
+ | `text` | `string` | **Required** | Text to animate. |
401
+ | `duration` | `number` | `500` | Base timing for each character's wave motion. |
402
+ | `stagger` | `number` | `80` | Time between character starts. |
403
+ | `amplitude` | `number` | `12` | Vertical travel distance. |
404
+ | `loop` | `boolean` | `false` | Repeat the wave. |
405
+ | `style` | `TextStyle` | — | Base text style. |
406
+ | `characterStyle` | `TextStyle` | — | Additional per-character style. |
407
+ | `containerStyle` | `ViewStyle` | — | Wrapping container style. |
408
+
409
+ ### TextWave
410
+
411
+ Draws a continuous sine wave through the characters on a Skia canvas.
412
+
413
+ ```tsx
414
+ <TextWave text="Ocean breeze" wavelength={8} direction="left" style={{ color: '#2563EB' }} />
415
+ ```
416
+
417
+ | Prop | Type | Default | Description |
418
+ | --- | --- | --- | --- |
419
+ | `text` | `string` | **Required** | Text to draw along the wave. |
420
+ | `amplitude` | `number` | `8` | Peak vertical displacement. |
421
+ | `wavelength` | `number` | `6` | Characters per wave period, with a minimum of 1. |
422
+ | `duration` | `number` | `1800` | Time for one wave cycle. |
423
+ | `delay` | `number` | `0` | Wait before the wave starts. |
424
+ | `direction` | `'left' \| 'right'` | `'right'` | Travel direction of the wave. |
425
+ | `loop` | `boolean` | `true` | Repeat the wave cycle. |
426
+ | `style` | `TextStyle` | — | Canvas font size, family, weight, font style, and text color. |
427
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
428
+
429
+ ### BounceText
430
+
431
+ Makes each character hop and settle in sequence.
432
+
433
+ ```tsx
434
+ <BounceText text="Jump in" amplitude={22} stagger={100} />
435
+ ```
436
+
437
+ | Prop | Type | Default | Description |
438
+ | --- | --- | --- | --- |
439
+ | `text` | `string` | **Required** | Text to bounce. |
440
+ | `duration` | `number` | `500` | Base timing for the bounce of each character. |
441
+ | `stagger` | `number` | `80` | Time between character starts. |
442
+ | `delay` | `number` | `0` | Wait before the first character starts. |
443
+ | `amplitude` | `number` | `15` | Height of the upward bounce. |
444
+ | `loop` | `boolean` | `false` | Repeat the bounce. |
445
+ | `style` | `TextStyle` | — | Base text style. |
446
+ | `characterStyle` | `TextStyle` | — | Additional per-character style. |
447
+ | `containerStyle` | `ViewStyle` | — | Wrapping container style. |
448
+
449
+ ### ElasticText
450
+
451
+ Stretches and squashes a line of text, then settles it with a spring.
452
+
453
+ ```tsx
454
+ <ElasticText text="Stretch your ideas" amplitude={0.35} damping={9} />
455
+ ```
456
+
457
+ | Prop | Type | Default | Description |
458
+ | --- | --- | --- | --- |
459
+ | `text` | `string` | **Required** | Text to stretch. |
460
+ | `duration` | `number` | `220` | Time for the initial stretch before the overshoot and spring settle. |
461
+ | `delay` | `number` | `0` | Wait before the stretch starts. |
462
+ | `amplitude` | `number` | `0.5` | Strength of the stretch and squash. |
463
+ | `damping` | `number` | `7` | Spring damping. |
464
+ | `stiffness` | `number` | `160` | Spring stiffness. |
465
+ | `loop` | `boolean` | `false` | Repeat the stretch. |
466
+ | `pauseDuration` | `number` | `1000` | Pause between stretches when looping. |
467
+ | `style` | `TextStyle` | — | Text style. |
468
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
469
+
470
+ ### ParticleText
471
+
472
+ Turns a text silhouette into Skia particles that assemble or disperse.
473
+
474
+ ```tsx
475
+ <ParticleText text="STARDUST" direction="disperse" particleShape="mixed" particleGlow />
476
+ ```
477
+
478
+ | Prop | Type | Default | Description |
479
+ | --- | --- | --- | --- |
480
+ | `text` | `string` | **Required** | Text silhouette to sample. |
481
+ | `fontSize` | `number` | `56` | Size of the text silhouette, set directly on the component. |
482
+ | `particleSize` | `number` | `2` | Size of each particle. |
483
+ | `duration` | `number` | `2500` | Motion time per particle. |
484
+ | `delay` | `number` | `0` for assemble, `750` for disperse | Time to hold the starting pose before particles move. |
485
+ | `stagger` | `number` | `0` | Delay increment used to distribute particle start times. Higher values can extend the total animation substantially. |
486
+ | `loop` | `boolean` | `false` | Play the reverse motion and repeat. |
487
+ | `direction` | `'assemble' \| 'disperse'` | `'assemble'` | Move particles into the text or away from it. |
488
+ | `particleColor` | `string` | `'#A855F7'` | Particle fill color. |
489
+ | `particleShape` | `'circle' \| 'square' \| 'diamond' \| 'mixed'` | `'circle'` | Particle shape. Mixed uses a combination of shapes. |
490
+ | `particleGlow` | `boolean` | `false` | Draw a glow around each particle. |
491
+ | `glowRadius` | `number` | `8` | Particle glow radius when enabled. |
492
+ | `glowColor` | `string` | `particleColor` | Particle glow color. |
493
+ | `style` | `TextStyle` | — | Font family and weight used for the text silhouette. |
494
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
495
+
496
+ ### ExplosionText
497
+
498
+ Scatters whole characters or brings them back together. Give long text a constrained width to wrap and allow space around the component for the burst.
499
+
500
+ ```tsx
501
+ <>
502
+ <ExplosionText text="NATIVEBITS" direction="explode" delay={600} />
503
+ <ExplosionText text={'BACK\nTOGETHER'} direction="implode" duration={1800} />
504
+ <ExplosionText text="REPLAY" loop distance={72} fade={false} />
505
+ </>
506
+ ```
507
+
508
+ | Prop | Type | Default | Description |
509
+ | --- | --- | --- | --- |
510
+ | `text` | `string` | **Required** | Text to scatter or reassemble. Supports explicit line breaks. |
511
+ | `duration` | `number` | `1800` | Motion time per character. |
512
+ | `delay` | `number` | `0` | Time to hold the starting pose. |
513
+ | `stagger` | `number` | `40` | Time between visible character starts. |
514
+ | `distance` | `number` | `100` | Travel distance of the burst. |
515
+ | `rotation` | `number` | `180` | Maximum rotation in degrees. Neighboring characters rotate in opposite directions. |
516
+ | `direction` | `'explode' \| 'implode'` | `'explode'` | Move characters outward or inward. |
517
+ | `loop` | `boolean` | `false` | Reverse the motion, then repeat. |
518
+ | `fade` | `boolean` | `true` | Fade characters as they move away from or toward the resting text. |
519
+ | `scale` | `boolean` | `true` | Change character size during the motion. |
520
+ | `style` | `TextStyle` | — | Text style, including alignment via textAlign. |
521
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
522
+
523
+ ### CountUpText
524
+
525
+ Animates a number between two values. It can also count down when the target is lower than the starting value.
526
+
527
+ ```tsx
528
+ <CountUpText from={0} to={99.5} decimals={1} suffix="%" duration={1600} />
529
+ ```
530
+
531
+ | Prop | Type | Default | Description |
532
+ | --- | --- | --- | --- |
533
+ | `from` | `number` | `0` | Starting value. |
534
+ | `to` | `number` | **Required** | Target value. |
535
+ | `duration` | `number` | `1500` | Time to reach the target. |
536
+ | `delay` | `number` | `0` | Wait before the first count starts. |
537
+ | `decimals` | `number` | `0` | Number of digits after the decimal point. |
538
+ | `prefix` | `string` | `''` | Text placed before the formatted number. |
539
+ | `suffix` | `string` | `''` | Text placed after the formatted number. |
540
+ | `easing` | `CountUpEasing` | `'easeOut'` | Timing curve. Options are `linear`, `easeIn`, `easeOut`, and `easeInOut`. |
541
+ | `loop` | `boolean` | `false` | Reset to the starting value and repeat. |
542
+ | `loopDelay` | `number` | `1000` | Time to hold the target value between counts. |
543
+ | `style` | `TextStyle` | — | Number text style. |
544
+ | `containerStyle` | `ViewStyle` | — | Outer container style. |
545
+
546
+ ## Troubleshooting
547
+
548
+ | Symptom | What to check |
549
+ | --- | --- |
550
+ | Reanimated reports that it failed to create a worklet | Check that your app uses the Worklets Babel plugin through Expo's preset or as the final plugin in Community CLI. Restart Metro with a clean cache. [Reanimated troubleshooting](https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting/) |
551
+ | A native module is missing or a version mismatch appears | Run `npm ls react-native-reanimated react-native-worklets @shopify/react-native-skia` in your app. Check that the versions match your React Native or Expo SDK, then rebuild the native app. [Reanimated compatibility table](https://docs.swmansion.com/react-native-reanimated/docs/guides/compatibility/) |
552
+ | A burst or glow is clipped | Check for clipping on parent views, including `overflow: 'hidden'`, and give the effect room to extend beyond the text. |
553
+
554
+ ## Development
555
+
556
+ ```sh
557
+ npm ci
558
+ npm run typecheck
559
+ npm run build
560
+ npm pack --dry-run
561
+ ```
562
+
563
+ ## License
564
+
565
+ MIT. See [LICENSE](./LICENSE).
Binary file