react-animate-z 1.0.3 โ 2.0.0
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.
- package/LICENSE +1 -1
- package/README.md +345 -182
- package/build/AnimBox/AnimateTyping.d.ts +15 -0
- package/build/AnimBox/StyledElement.d.ts +5 -0
- package/build/AnimBox/WrapperAnimate.d.ts +4 -0
- package/build/AnimBox/durations.d.ts +1 -0
- package/build/AnimBox/frames/_index.d.ts +208 -0
- package/build/AnimBox/frames/attention.d.ts +7 -0
- package/build/AnimBox/frames/blur.d.ts +12 -0
- package/build/AnimBox/frames/bounce.d.ts +9 -0
- package/build/AnimBox/frames/fade.d.ts +24 -0
- package/build/AnimBox/frames/flash.d.ts +7 -0
- package/build/AnimBox/frames/flip.d.ts +23 -0
- package/build/AnimBox/frames/float.d.ts +7 -0
- package/build/AnimBox/frames/fold.d.ts +6 -0
- package/build/AnimBox/frames/funMap.d.ts +10 -0
- package/build/AnimBox/frames/glowing.d.ts +7 -0
- package/build/AnimBox/frames/hangOn.d.ts +12 -0
- package/build/AnimBox/frames/jelly.d.ts +7 -0
- package/build/AnimBox/frames/motion.d.ts +16 -0
- package/build/AnimBox/frames/pop.d.ts +16 -0
- package/build/AnimBox/frames/pulse.d.ts +7 -0
- package/build/AnimBox/frames/rotate.d.ts +15 -0
- package/build/AnimBox/frames/slide.d.ts +18 -0
- package/build/AnimBox/frames/squeezeShake.d.ts +12 -0
- package/build/AnimBox/frames/textEffects.d.ts +9 -0
- package/build/AnimBox/frames/zoom.d.ts +12 -0
- package/build/AnimBox/index.d.ts +4 -0
- package/build/AnimBox/types.d.ts +27 -0
- package/build/index.d.ts +5 -6
- package/build/index.esm.js +1 -1
- package/build/index.js +1 -1
- package/package.json +76 -79
- package/build/components/AnimationConstant.d.ts +0 -26
- package/build/components/AnimationTyping.d.ts +0 -4
- package/build/components/AnimationWrapper.d.ts +0 -3
- package/build/components/IFType.d.ts +0 -26
- package/build/components/index.d.ts +0 -4
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,213 +1,376 @@
|
|
|
1
|
+
# ๐ฆ react-animate-z
|
|
2
|
+
|
|
1
3
|
<div align="center">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
<b>โจ Simple React animation components built with styled-components</b>.
|
|
5
|
+
<br />
|
|
6
|
+
<br />
|
|
7
|
+
<a href="https://www.npmjs.com/package/react-animate-z">react-animate-z</a>
|
|
8
|
+
<br />
|
|
9
|
+
<br />
|
|
10
|
+
<b><a href="https://codesandbox.io/p/devbox/lively-night-lrjs4s">LIVE EXAMPLE</a></b>
|
|
7
11
|
</div>
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
React Component to show animated text and objects, built with [styled-components](https://www.styled-components.com/).
|
|
13
|
+
<br />
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
[](https://www.npmjs.com/package/react-animate-z)
|
|
16
|
+
[](https://standardjs.com)
|
|
17
|
+

|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
A React + styled-components based animation library with more than
|
|
20
|
+
**180+ pre-built animations**.
|
|
15
21
|
|
|
16
|
-
##
|
|
22
|
+
## ๐ Features
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
โ
Easy-to-use animation wrapper for any element
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
npm i react-animate-z
|
|
22
|
-
```
|
|
26
|
+
โ
Fully typed with TypeScript
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
โ
Customizable duration, delay, iteration, timing, direction, fillMode
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
wrap the content with a `Animate` component and customize the animation with relevant properties.
|
|
30
|
+
โ
Typewriter-style text animation with blinking cursor
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
## ๐ Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install react-animate-z
|
|
36
|
+
|
|
37
|
+
# or
|
|
38
|
+
|
|
39
|
+
yarn add react-animate-z
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## ๐ฌ Usage
|
|
31
43
|
|
|
32
|
-
|
|
44
|
+
```tsx
|
|
45
|
+
import React from "react";
|
|
46
|
+
import Animate from "react-animate-z";
|
|
47
|
+
|
|
48
|
+
export default function App() {
|
|
33
49
|
return (
|
|
34
|
-
<Animate
|
|
35
|
-
|
|
36
|
-
duration="1000ms"
|
|
37
|
-
delay="0s"
|
|
38
|
-
direction="normal"
|
|
39
|
-
timing="ease"
|
|
40
|
-
iteration="infinite"
|
|
41
|
-
fillMode="none">
|
|
42
|
-
Content...
|
|
50
|
+
<Animate type="bounce" duration="1s">
|
|
51
|
+
<h1>Hello Animation</h1>
|
|
43
52
|
</Animate>
|
|
44
|
-
)
|
|
53
|
+
);
|
|
45
54
|
}
|
|
46
55
|
```
|
|
47
56
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
| Property | Corresponding Animation Property | Data Type | Default Value | Property Unit |
|
|
51
|
-
| :---------: | :------------------------------: | :---------------: | :------------: | :-----------: |
|
|
52
|
-
| `type` | `animation-name` | `String` | "blur" | - |
|
|
53
|
-
| `duration` | `animation-duration` | `String` | "1s" | `s` or `ms` |
|
|
54
|
-
| `delay` | `animation-delay` | `String` | "0s" | `s` or `ms` |
|
|
55
|
-
| `direction` | `animation-direction` | `String` | "alternate" | - |
|
|
56
|
-
| `timing` | `animation-timing-function` | `String` | "ease" | - |
|
|
57
|
-
| `iteration` | `animation-iteration-count` | `Number` `String` | "infinite" | - |
|
|
58
|
-
| `fillMode` | `animation-fill-mode` | `String` | "none" | - |
|
|
59
|
-
|
|
60
|
-
### Available animations name (see mapping)
|
|
61
|
-
|
|
62
|
-
| `type` / Animation name |
|
|
63
|
-
| ----------------------- |
|
|
64
|
-
| `blur` |
|
|
65
|
-
| `fadeIn` |
|
|
66
|
-
| `fadeOut` |
|
|
67
|
-
| `hang` |
|
|
68
|
-
| `hangOnLeft` |
|
|
69
|
-
| `hangOnRight` |
|
|
70
|
-
| `swing` |
|
|
71
|
-
| `glowing` |
|
|
72
|
-
| `shakeMix` |
|
|
73
|
-
| `shakeHorizontal` |
|
|
74
|
-
| `shakeVertical` |
|
|
75
|
-
| `spin` |
|
|
76
|
-
| `bounce` |
|
|
77
|
-
| `flipCenterToRight` |
|
|
78
|
-
| `flipFromLeftToCenter` |
|
|
79
|
-
| `flash` |
|
|
80
|
-
| `pulse` |
|
|
81
|
-
| `jelly` |
|
|
82
|
-
| `squeezeHorizontal` |
|
|
83
|
-
| `squeezeVertical` |
|
|
84
|
-
| `flipHorizontal` |
|
|
85
|
-
| `flipVertical` |
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
## Chain Animation
|
|
89
|
-
An string-arry of animation names is used to wrap the animations you want to chain.
|
|
57
|
+
## ๐ง Props
|
|
90
58
|
|
|
91
|
-
|
|
92
|
-
import Animate from 'react-animate-z'
|
|
59
|
+
Prop Type Default Description
|
|
93
60
|
|
|
94
|
-
|
|
61
|
+
| Prop | Type | Default | Description |
|
|
62
|
+
| ----------- | ---------------------- | ------------ | ---------------------------------------------------------------------------------------- |
|
|
63
|
+
| `type` | `AnimateType` | `'blurIn'` | Animation name (vรญ dแปฅ: `'blurIn'`, `'bounce'`, `'fadeOut'`, ...) |
|
|
64
|
+
| `duration` | `string \| number` | `'1s'` | Duration of the animation (can be in seconds `'1s'` or milliseconds `1000`) |
|
|
65
|
+
| `timing` | `TimingKey` | `'ease'` | Timing function (e.g., `'ease'`, `'linear'`, `'ease-in'`, `'ease-out'`) |
|
|
66
|
+
| `delay` | `string \| number` | `'0s'` | Delay before the animation starts |
|
|
67
|
+
| `iteration` | `number \| "infinite"` | `1` | Repeat count of the animation |
|
|
68
|
+
| `direction` | `string` | `'normal'` | Animation direction (`'normal'`, `'alternate'`, `'reverse'`, etc.) |
|
|
69
|
+
| `fillMode` | `string` | `'forwards'` | How styles are applied after animation (`'forwards'`, `'backwards'`, `'both'`, `'none'`) |
|
|
70
|
+
| `tagName` | `string` | `'div'` | Custom HTML tag to render |
|
|
95
71
|
|
|
96
|
-
|
|
72
|
+
---
|
|
97
73
|
|
|
98
|
-
|
|
99
|
-
const [animationType, setAnimationType] = useState(AnimationsForChaining[0])
|
|
74
|
+
## ๐จ Available Animations
|
|
100
75
|
|
|
101
|
-
|
|
102
|
-
setCounter(animationIndex+1)
|
|
103
|
-
setAnimationType(selectedItems[animationIndex+1])
|
|
104
|
-
}
|
|
76
|
+
### ๐พ Bounce
|
|
105
77
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
Animate
|
|
114
|
-
</Animate>
|
|
115
|
-
)
|
|
116
|
-
}
|
|
117
|
-
```
|
|
78
|
+
- bounce
|
|
79
|
+
- bounceIn
|
|
80
|
+
- bounceOut
|
|
81
|
+
- bounceElastic
|
|
82
|
+
- bounceSmall
|
|
83
|
+
- bounceRotate
|
|
84
|
+
- bounceJelly
|
|
118
85
|
|
|
119
|
-
|
|
86
|
+
### โจ Text / Glow Effects
|
|
120
87
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
88
|
+
- effect3D
|
|
89
|
+
- neonGlow
|
|
90
|
+
- retro3D
|
|
91
|
+
- emboss
|
|
92
|
+
- fireGlow
|
|
93
|
+
- iceGlow
|
|
94
|
+
- shine
|
|
95
|
+
|
|
96
|
+
### ๐ซ Blur
|
|
97
|
+
|
|
98
|
+
- blurIn
|
|
99
|
+
- blurInZoom
|
|
100
|
+
- blurInScale
|
|
101
|
+
- blurInUp
|
|
102
|
+
- blurInRotate
|
|
103
|
+
- blurOut
|
|
104
|
+
- blurOutZoom
|
|
105
|
+
- blurOutScale
|
|
106
|
+
- blurOutDown
|
|
107
|
+
- blurOutRotate
|
|
108
|
+
|
|
109
|
+
### โก Flash
|
|
110
|
+
|
|
111
|
+
- flash
|
|
112
|
+
- flashIrregular
|
|
113
|
+
- flashFast
|
|
114
|
+
- flashSlow
|
|
115
|
+
- flashPulse
|
|
116
|
+
|
|
117
|
+
### ๐ Float
|
|
118
|
+
|
|
119
|
+
- float
|
|
120
|
+
- floatSway
|
|
121
|
+
- floatHorizontal
|
|
122
|
+
- floatCircular
|
|
123
|
+
- floatWiggle
|
|
124
|
+
|
|
125
|
+
### ๐ก Glow
|
|
126
|
+
|
|
127
|
+
- glow
|
|
128
|
+
- glowTextFlicker
|
|
129
|
+
- glowRainbow
|
|
130
|
+
- glowBreathing
|
|
131
|
+
- glowGlitch
|
|
132
|
+
|
|
133
|
+
### ๐ฎ Jelly
|
|
134
|
+
|
|
135
|
+
- jelly
|
|
136
|
+
- jellyX
|
|
137
|
+
- jellyY
|
|
138
|
+
- jellyIn
|
|
139
|
+
- jellyOut
|
|
140
|
+
|
|
141
|
+
### ๐ Shadow / Spin / Swing / Orbit
|
|
142
|
+
|
|
143
|
+
- shadow
|
|
144
|
+
- shadowText
|
|
145
|
+
- shadowPulse
|
|
146
|
+
- shadowNeon
|
|
147
|
+
- spin
|
|
148
|
+
- spin3D
|
|
149
|
+
- spinX
|
|
150
|
+
- spinBounce
|
|
151
|
+
- swing
|
|
152
|
+
- swingPivot
|
|
153
|
+
- swingX
|
|
154
|
+
- swingY
|
|
155
|
+
- orbit
|
|
156
|
+
- orbitEllipse
|
|
185
157
|
|
|
186
|
-
|
|
158
|
+
### ๐ Pulse
|
|
159
|
+
|
|
160
|
+
- pulse
|
|
161
|
+
- pulseInOut
|
|
162
|
+
- pulseFade
|
|
163
|
+
- pulseFast
|
|
164
|
+
- pulseColor
|
|
165
|
+
|
|
166
|
+
### ๐ซ Fade
|
|
167
|
+
|
|
168
|
+
- fadeIn
|
|
169
|
+
- fadeOut
|
|
170
|
+
- fadeInFromLeft
|
|
171
|
+
- fadeInFromRight
|
|
172
|
+
- fadeInFromTop
|
|
173
|
+
- fadeInFromBottom
|
|
174
|
+
- fadeOutToLeft
|
|
175
|
+
- fadeOutToRight
|
|
176
|
+
- fadeOutToTop
|
|
177
|
+
- fadeOutToBottom
|
|
178
|
+
- fadeInZoom
|
|
179
|
+
- fadeOutZoom
|
|
180
|
+
- fadeInRotate
|
|
181
|
+
- fadeOutRotate
|
|
182
|
+
- fadeInSkew
|
|
183
|
+
- fadeOutSkew
|
|
184
|
+
- fadeInFlipX
|
|
185
|
+
- fadeOutFlipX
|
|
186
|
+
- fadeInFlipY
|
|
187
|
+
- fadeOutFlipY
|
|
188
|
+
- fadeInPerspective
|
|
189
|
+
- fadeOutPerspective
|
|
190
|
+
|
|
191
|
+
### ๐คฏ Squeeze / Shake
|
|
192
|
+
|
|
193
|
+
- squeezeMix
|
|
194
|
+
- squeezeHorizontal
|
|
195
|
+
- squeezeVertical
|
|
196
|
+
- squeezeDiagonal
|
|
197
|
+
- squeezePulse
|
|
198
|
+
- shakeMix
|
|
199
|
+
- shakeHorizontal
|
|
200
|
+
- shakeVertical
|
|
201
|
+
- shakeDiagonal
|
|
202
|
+
- shakeQuick
|
|
203
|
+
|
|
204
|
+
### ๐ฅ Slide
|
|
205
|
+
|
|
206
|
+
- slideInFromLeft
|
|
207
|
+
- slideInFromRight
|
|
208
|
+
- slideOutToLeft
|
|
209
|
+
- slideOutToRight
|
|
210
|
+
- slideInFromTop
|
|
211
|
+
- slideInFromBottom
|
|
212
|
+
- slideOutToTop
|
|
213
|
+
- slideOutToBottom
|
|
214
|
+
- slideInFromLeftOvershoot
|
|
215
|
+
- slideInFromRightOvershoot
|
|
216
|
+
- slideOutToLeftOvershoot
|
|
217
|
+
- slideOutToRightOvershoot
|
|
218
|
+
- slideInFromTopOvershoot
|
|
219
|
+
- slideInFromBottomOvershoot
|
|
220
|
+
- slideOutToTopOvershoot
|
|
221
|
+
- slideOutToBottomOvershoot
|
|
222
|
+
|
|
223
|
+
### ๐ Flip
|
|
224
|
+
|
|
225
|
+
- flip
|
|
226
|
+
- flipIn
|
|
227
|
+
- flipOut
|
|
228
|
+
- flipSlowDown
|
|
229
|
+
- flipToLeft
|
|
230
|
+
- flipToRight
|
|
231
|
+
- flipFromTop
|
|
232
|
+
- flipToTop
|
|
233
|
+
- flipToBottom
|
|
234
|
+
- flipFromBottom
|
|
235
|
+
- flipFromLeftToCenter
|
|
236
|
+
- flipFromRightToCenter
|
|
237
|
+
- flipRich
|
|
238
|
+
- flipToTopRich
|
|
239
|
+
- flipToBottomRich
|
|
240
|
+
- flipToTopLeftRich
|
|
241
|
+
- flipToRightRich
|
|
242
|
+
- flipFromTopRich
|
|
243
|
+
- flipFromBottomRich
|
|
244
|
+
- flipFromLeftToCenterRich
|
|
245
|
+
- flipFromRightToCenterRich
|
|
246
|
+
|
|
247
|
+
### ๐ Fold / Unfold
|
|
248
|
+
|
|
249
|
+
- fold
|
|
250
|
+
- foldDeep
|
|
251
|
+
- unfold
|
|
252
|
+
- unfoldDeep
|
|
253
|
+
|
|
254
|
+
### ๐ช Hang On
|
|
255
|
+
|
|
256
|
+
- hangOnLeft
|
|
257
|
+
- hangOnRight
|
|
258
|
+
- hangOnTop
|
|
259
|
+
- hangOnBottom
|
|
260
|
+
- hangOnLeftSwing
|
|
261
|
+
- hangOnRightSwing
|
|
262
|
+
- hangOnTopSwing
|
|
263
|
+
- hangOnBottomSwing
|
|
264
|
+
- hangOnOscillate
|
|
265
|
+
- hangOnDrop
|
|
266
|
+
|
|
267
|
+
### ๐ Zoom
|
|
268
|
+
|
|
269
|
+
- zoomIn
|
|
270
|
+
- zoomOut
|
|
271
|
+
- zoomInFromLeft
|
|
272
|
+
- zoomInFromRight
|
|
273
|
+
- zoomInFromTop
|
|
274
|
+
- zoomInFromBottom
|
|
275
|
+
- zoomOutToLeft
|
|
276
|
+
- zoomOutToRight
|
|
277
|
+
- zoomOutToTop
|
|
278
|
+
- zoomOutToBottom
|
|
279
|
+
|
|
280
|
+
### ๐ Rotate
|
|
281
|
+
|
|
282
|
+
- rotateCW
|
|
283
|
+
- rotateACW
|
|
284
|
+
- rotateSlowDown
|
|
285
|
+
- rotateX
|
|
286
|
+
- rotateY
|
|
287
|
+
- rotateFromLeft
|
|
288
|
+
- rotateFromRight
|
|
289
|
+
- rotateToLeft
|
|
290
|
+
- rotateToRight
|
|
291
|
+
- rotateFromTop
|
|
292
|
+
- rotateFromBottom
|
|
293
|
+
- rotateToTop
|
|
294
|
+
- rotateToBottom
|
|
295
|
+
|
|
296
|
+
### ๐ Fun / Attention
|
|
297
|
+
|
|
298
|
+
- heartBeat
|
|
299
|
+
- tada
|
|
300
|
+
- hinge
|
|
301
|
+
- lightSpeedInLeft
|
|
302
|
+
- lightSpeedOutRight
|
|
303
|
+
- popIn
|
|
304
|
+
- popOut
|
|
305
|
+
- popBounceIn
|
|
306
|
+
- popBounceOut
|
|
307
|
+
- popUpIn
|
|
308
|
+
- popUpOut
|
|
309
|
+
- popRotateIn
|
|
310
|
+
- popRotateOut
|
|
311
|
+
- popBlurIn
|
|
312
|
+
- popBlurOut
|
|
313
|
+
- popLeftIn
|
|
314
|
+
- popLeftOut
|
|
315
|
+
- popRightIn
|
|
316
|
+
- popRightOut
|
|
317
|
+
- rubberBand
|
|
318
|
+
- jello
|
|
319
|
+
- wobble
|
|
320
|
+
- rollIn
|
|
321
|
+
- jackInTheBox
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
#### Chain Animation
|
|
326
|
+
|
|
327
|
+
An string-arry of animation names is used to wrap the animations you want to chain.
|
|
187
328
|
|
|
188
329
|
```js
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
330
|
+
import React, { useState } from "react";
|
|
331
|
+
import { AnimateTyping } from "react-animate-z";
|
|
332
|
+
|
|
333
|
+
const AnimationsForChaining = [
|
|
334
|
+
"swing",
|
|
335
|
+
"flipSlowDown",
|
|
336
|
+
"fadeOutToBottom",
|
|
337
|
+
"jelly",
|
|
338
|
+
];
|
|
339
|
+
|
|
340
|
+
const AnimationChain: React.FC = () => {
|
|
341
|
+
// const [animationIndex, setAnimationIndex] = useState(0);
|
|
342
|
+
// const [animationType, setAnimationType] = useState(AnimationsForChaining[0]);
|
|
343
|
+
|
|
344
|
+
// const handleChainAnimation = () => {
|
|
345
|
+
// const nextIndex = (animationIndex + 1) % AnimationsForChaining.length;
|
|
346
|
+
// setAnimationIndex(nextIndex);
|
|
347
|
+
// setAnimationType(AnimationsForChaining[nextIndex]);
|
|
348
|
+
// };
|
|
349
|
+
|
|
350
|
+
return (
|
|
351
|
+
<>
|
|
352
|
+
<AnimateTyping
|
|
353
|
+
heading="Hello,"
|
|
354
|
+
dataText={["I am Delpi", "I build animations", "I love coding!"]}
|
|
355
|
+
cursorColor="red"
|
|
356
|
+
/>
|
|
357
|
+
|
|
358
|
+
<AnimateTyping dataText="Only once" />
|
|
359
|
+
|
|
360
|
+
<AnimateTyping
|
|
361
|
+
heading="Fast typing:"
|
|
362
|
+
dataText={["speed x2", "super fast!"]}
|
|
363
|
+
typingSpeed={50}
|
|
364
|
+
deletingSpeed={20}
|
|
365
|
+
pauseTime={1000}
|
|
366
|
+
/>
|
|
367
|
+
</>
|
|
368
|
+
);
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
export default AnimationChain;
|
|
209
372
|
```
|
|
210
373
|
|
|
211
|
-
|
|
374
|
+
## ๐ License
|
|
212
375
|
|
|
213
|
-
MIT
|
|
376
|
+
MIT ยฉ Delpi
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ICursorProps {
|
|
3
|
+
readonly cursorColor?: string | null;
|
|
4
|
+
}
|
|
5
|
+
export interface IAnimateTypingProps extends ICursorProps {
|
|
6
|
+
readonly heading?: string;
|
|
7
|
+
readonly className?: string;
|
|
8
|
+
readonly dataText?: string[] | string;
|
|
9
|
+
readonly children?: React.ReactNode | string[] | string;
|
|
10
|
+
readonly typingSpeed?: number;
|
|
11
|
+
readonly deletingSpeed?: number;
|
|
12
|
+
readonly pauseTime?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const AnimateTyping: React.FC<IAnimateTypingProps>;
|
|
15
|
+
export default AnimateTyping;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type IBaseStyledElementProps } from "./types";
|
|
3
|
+
export declare const StyledElement: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
4
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
5
|
+
}, IBaseStyledElementProps>> & string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultDurationMap: Record<string, string>;
|