react-animate-z 2.3.0 → 3.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 +249 -339
- package/build/animation/durations.d.ts +64 -0
- package/build/animation/index.d.ts +3 -0
- package/build/animation/sequence.d.ts +15 -0
- package/build/animation/types.d.ts +34 -0
- package/build/components/Animate.d.ts +4 -0
- package/build/components/AnimateGroup.d.ts +9 -0
- package/build/components/AnimateHost.d.ts +8 -0
- package/build/components/AnimateOn.d.ts +12 -0
- package/build/components/AnimatePresence.d.ts +12 -0
- package/build/{AnimBox/StyledElement.d.ts → components/AnimateStyled.d.ts} +1 -1
- package/build/{AnimBox/AnimateTyping.d.ts → components/Typing.d.ts} +11 -6
- package/build/components/TypingText.d.ts +8 -0
- package/build/{AnimBox → components}/WrapperAnimate.d.ts +1 -1
- package/build/components/index.d.ts +8 -0
- package/build/core/createAnimate.d.ts +9 -0
- package/build/core/index.d.ts +1 -0
- package/build/core/injectKeyframe.d.ts +1 -0
- package/build/core/recipe.d.ts +7 -0
- package/build/hooks/index.d.ts +16 -0
- package/build/hooks/types.d.ts +13 -0
- package/build/hooks/useAnimate.d.ts +9 -0
- package/build/hooks/useAnimateController.d.ts +16 -0
- package/build/hooks/useAnimateSequence.d.ts +2 -0
- package/build/hooks/useAttention.d.ts +11 -0
- package/build/hooks/useAutoAnimate.d.ts +10 -0
- package/build/hooks/useFocusAnimate.d.ts +16 -0
- package/build/hooks/useHoverAnimate.d.ts +16 -0
- package/build/hooks/usePairedAnimate.d.ts +10 -0
- package/build/hooks/useRandomAnimate.d.ts +3 -0
- package/build/hooks/useRandomAnimateByIntensity.d.ts +6 -0
- package/build/hooks/useRandomAnimateNoRepeat.d.ts +4 -0
- package/build/hooks/useRecipe.d.ts +13 -0
- package/build/hooks/useTypingAnimate.d.ts +11 -0
- package/build/hooks/useWeightedRandomAnimate.d.ts +9 -0
- package/build/index.cjs.js +22 -0
- package/build/index.cjs.js.map +1 -0
- package/build/index.d.ts +44 -8
- package/build/index.esm.js +15 -1069
- package/build/index.esm.js.map +1 -0
- package/build/key-frames/attention.d.ts +7 -0
- package/build/key-frames/blur.d.ts +12 -0
- package/build/key-frames/bounce.d.ts +18 -0
- package/build/key-frames/fade.d.ts +38 -0
- package/build/key-frames/flash.d.ts +12 -0
- package/build/key-frames/flip.d.ts +23 -0
- package/build/key-frames/float.d.ts +12 -0
- package/build/key-frames/fold.d.ts +14 -0
- package/build/key-frames/funMap.d.ts +10 -0
- package/build/key-frames/glowing.d.ts +7 -0
- package/build/key-frames/hangOn.d.ts +12 -0
- package/build/key-frames/index.d.ts +343 -0
- package/build/key-frames/jelly.d.ts +7 -0
- package/build/key-frames/motion.d.ts +16 -0
- package/build/key-frames/pop.d.ts +16 -0
- package/build/key-frames/pulse.d.ts +7 -0
- package/build/key-frames/rotate.d.ts +15 -0
- package/build/key-frames/slide.d.ts +18 -0
- package/build/key-frames/squeezeShake.d.ts +22 -0
- package/build/key-frames/textEffects.d.ts +9 -0
- package/build/key-frames/zoom.d.ts +20 -0
- package/package.json +21 -51
- package/build/AnimBox/durations.d.ts +0 -1
- package/build/AnimBox/frames/attention.d.ts +0 -7
- package/build/AnimBox/frames/blur.d.ts +0 -12
- package/build/AnimBox/frames/bounce.d.ts +0 -18
- package/build/AnimBox/frames/fade.d.ts +0 -34
- package/build/AnimBox/frames/flash.d.ts +0 -12
- package/build/AnimBox/frames/flip.d.ts +0 -23
- package/build/AnimBox/frames/float.d.ts +0 -12
- package/build/AnimBox/frames/fold.d.ts +0 -14
- package/build/AnimBox/frames/funMap.d.ts +0 -10
- package/build/AnimBox/frames/glowing.d.ts +0 -7
- package/build/AnimBox/frames/hangOn.d.ts +0 -12
- package/build/AnimBox/frames/index.d.ts +0 -339
- package/build/AnimBox/frames/jelly.d.ts +0 -7
- package/build/AnimBox/frames/motion.d.ts +0 -16
- package/build/AnimBox/frames/pop.d.ts +0 -16
- package/build/AnimBox/frames/pulse.d.ts +0 -7
- package/build/AnimBox/frames/rotate.d.ts +0 -15
- package/build/AnimBox/frames/slide.d.ts +0 -18
- package/build/AnimBox/frames/squeezeShake.d.ts +0 -22
- package/build/AnimBox/frames/textEffects.d.ts +0 -9
- package/build/AnimBox/frames/zoom.d.ts +0 -20
- package/build/AnimBox/index.d.ts +0 -4
- package/build/AnimBox/types.d.ts +0 -26
- package/build/index.js +0 -1076
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,50 +1,43 @@
|
|
|
1
|
-
# 📦 react-animate-z
|
|
2
1
|
|
|
3
|
-
|
|
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>
|
|
11
|
-
</div>
|
|
2
|
+
# 🎞️ react-animate-z
|
|
12
3
|
|
|
13
|
-
|
|
4
|
+
[](https://www.npmjs.com/package/react-animate-z) 
|
|
14
5
|
|
|
15
|
-
|
|
16
|
-
[](https://standardjs.com)
|
|
17
|
-

|
|
6
|
+
<a href="https://codesandbox.io/p/devbox/lively-night-lrjs4s" target="_blank">LIVE EXAMPLE</a>
|
|
18
7
|
|
|
19
|
-
A React + styled-components based animation library with more than
|
|
20
|
-
**180+ pre-built animations**.
|
|
21
8
|
|
|
22
|
-
|
|
9
|
+
A lightweight, UX-first animation library for React.
|
|
23
10
|
|
|
24
|
-
|
|
11
|
+
**react-animate-z** provides a clean imperative + declarative API to orchestrate animations
|
|
25
12
|
|
|
26
|
-
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## ✨ Why react-animate-z
|
|
27
16
|
|
|
28
|
-
|
|
17
|
+
- 🚀 180+ prebuilt animations
|
|
18
|
+
- 🧠 Semantic UX states (loading / success / error)
|
|
19
|
+
- ⛓️ Timeline API (sequence, parallel, wait)
|
|
20
|
+
- 🎯 Ref-based animation (no wrapper required)
|
|
21
|
+
- 🎲 Random & playful animation hooks
|
|
22
|
+
- ♿ Reduced-motion safe
|
|
23
|
+
- 🧩 Fully typed with TypeScript
|
|
29
24
|
|
|
30
|
-
|
|
25
|
+
---
|
|
31
26
|
|
|
32
|
-
##
|
|
27
|
+
## 📦 Installation
|
|
33
28
|
|
|
34
29
|
```bash
|
|
35
30
|
npm install react-animate-z
|
|
36
|
-
|
|
37
31
|
# or
|
|
38
|
-
|
|
39
32
|
yarn add react-animate-z
|
|
40
33
|
```
|
|
41
34
|
|
|
42
|
-
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 🚀 Basic Usage (Declarative)
|
|
43
38
|
|
|
44
39
|
```tsx
|
|
45
|
-
import React from "react";
|
|
46
40
|
import Animate from "react-animate-z";
|
|
47
|
-
import { animGroups, animNames } from "react-animate-z";
|
|
48
41
|
|
|
49
42
|
export default function App() {
|
|
50
43
|
return (
|
|
@@ -55,342 +48,259 @@ export default function App() {
|
|
|
55
48
|
}
|
|
56
49
|
```
|
|
57
50
|
|
|
51
|
+
## 🎛️ Animation Catalog
|
|
52
|
+
```ts
|
|
53
|
+
import { animNames, animGroups } from "react-animate-z";
|
|
54
|
+
|
|
55
|
+
console.log(animNames); // all animation names
|
|
56
|
+
console.log(animGroups); // grouped by category
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 🔧 `Animate` Props
|
|
63
|
+
|
|
64
|
+
| Prop | Type | Default | Description |
|
|
65
|
+
|-------------|------------------------|-------------|---------------------|
|
|
66
|
+
| `type` | `AnimateType` | `blurIn` | Animation name |
|
|
67
|
+
| `duration` | `string \| number` | preset map | `'1s'` or `1000` |
|
|
68
|
+
| `timing` | `TimingKey` | `ease` | CSS timing function |
|
|
69
|
+
| `delay` | `string \| number` | `0s` | Delay before start |
|
|
70
|
+
| `iteration` | `number \| "infinite"` | `1` | Repeat count |
|
|
71
|
+
| `direction` | `string` | `normal` | Animation direction |
|
|
72
|
+
| `fillMode` | `string` | `forwards` | CSS fill-mode |
|
|
73
|
+
| `tagName` | `string` | `div` | Rendered HTML tag |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🎯 Ref-based Animation (Imperative)
|
|
78
|
+
|
|
58
79
|
```tsx
|
|
59
|
-
|
|
60
|
-
import { animGroups, animNames } from "react-animate-z";
|
|
80
|
+
import { useAnimate } from "react-animate-z";
|
|
61
81
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
82
|
+
function Box() {
|
|
83
|
+
const { ref, play } = useAnimate<HTMLDivElement>();
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<div ref={ref} onClick={() => play("pulse")}>
|
|
87
|
+
Click me
|
|
88
|
+
</div>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
65
91
|
```
|
|
66
92
|
|
|
67
|
-
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## ⛓️ Timeline API
|
|
96
|
+
|
|
97
|
+
Compose animations as clear motion flows, not nested callbacks.
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
import { useAnimate } from "react-animate-z";
|
|
101
|
+
import { useEffect } from "react";
|
|
102
|
+
|
|
103
|
+
function Example() {
|
|
104
|
+
const { ref, sequence } = useAnimate<HTMLDivElement>();
|
|
105
|
+
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
sequence()
|
|
108
|
+
.animate("fadeInFromBottom")
|
|
109
|
+
.wait(300)
|
|
110
|
+
.animate("pulse");
|
|
111
|
+
}, []);
|
|
112
|
+
|
|
113
|
+
return <div ref={ref}>Hello</div>;
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 🧠 Semantic Recipes (State-driven UX)
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
import { useRecipe } from "react-animate-z";
|
|
123
|
+
|
|
124
|
+
function SaveButton() {
|
|
125
|
+
const anim = useRecipe();
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<button
|
|
129
|
+
ref={anim.ref}
|
|
130
|
+
onClick={async () => {
|
|
131
|
+
anim.loading();
|
|
132
|
+
await save();
|
|
133
|
+
anim.success();
|
|
134
|
+
}}
|
|
135
|
+
>
|
|
136
|
+
Save
|
|
137
|
+
</button>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Available presets:
|
|
143
|
+
- loading()
|
|
144
|
+
- success()
|
|
145
|
+
- error()
|
|
146
|
+
- idle()
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## 🔁 <AnimateOn /> — Trigger by State Change
|
|
68
151
|
|
|
69
|
-
|
|
152
|
+
```ts
|
|
153
|
+
import { AnimateOn } from "react-animate-z";
|
|
70
154
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
| `delay` | `string \| number` | `'0s'` | Delay before the animation starts |
|
|
77
|
-
| `iteration` | `number \| "infinite"` | `1` | Repeat count of the animation |
|
|
78
|
-
| `direction` | `string` | `'normal'` | Animation direction (`'normal'`, `'alternate'`, `'reverse'`, etc.) |
|
|
79
|
-
| `fillMode` | `string` | `'forwards'` | How styles are applied after animation (`'forwards'`, `'backwards'`, `'both'`, `'none'`) |
|
|
80
|
-
| `tagName` | `string` | `'div'` | Custom HTML tag to render |
|
|
155
|
+
<AnimateOn when={status} value="success" anim={["fadeIn", "pulse"]}>
|
|
156
|
+
<div>Done!</div>
|
|
157
|
+
</AnimateOn>
|
|
158
|
+
|
|
159
|
+
```
|
|
81
160
|
|
|
82
161
|
---
|
|
83
162
|
|
|
84
|
-
|
|
163
|
+
## 🧩 AnimateGroup – Staggered Children
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
import { AnimateGroup } from "react-animate-z";
|
|
167
|
+
|
|
168
|
+
<AnimateGroup type="fadeInUp" stagger={160}>
|
|
169
|
+
<div>Item 1</div>
|
|
170
|
+
<div>Item 2</div>
|
|
171
|
+
<div>Item 3</div>
|
|
172
|
+
</AnimateGroup>
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
85
177
|
|
|
86
|
-
|
|
178
|
+
## ⌨️ Typing Animation
|
|
87
179
|
|
|
88
|
-
```
|
|
89
|
-
import React, { useState } from "react";
|
|
180
|
+
```tsx
|
|
90
181
|
import { AnimateTyping } from "react-animate-z";
|
|
91
182
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
183
|
+
<AnimateTyping
|
|
184
|
+
dataText={[
|
|
185
|
+
"Hello World",
|
|
186
|
+
"React Animate Z",
|
|
187
|
+
"Built for UX",
|
|
188
|
+
]}
|
|
189
|
+
/>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 🎲 Random & Playful Motion
|
|
195
|
+
|
|
196
|
+
```ts
|
|
197
|
+
import { useRandomAnimateNoRepeat } from "react-animate-z";
|
|
198
|
+
|
|
199
|
+
const play = useRandomAnimateNoRepeat(run, [
|
|
200
|
+
"shakeMix",
|
|
201
|
+
"pulse",
|
|
202
|
+
"flash",
|
|
96
203
|
"jelly",
|
|
97
|
-
];
|
|
204
|
+
]);
|
|
205
|
+
|
|
206
|
+
<button onClick={() => play()}>Surprise me</button>
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
98
211
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
212
|
+
## 🪄 AnimatePresence (Enter / Exit)
|
|
213
|
+
|
|
214
|
+
`AnimatePresence` animates mount / unmount using enter / exit animation pairs,
|
|
215
|
+
similar to Framer Motion but lighter, CSS-based, and no styled-components dependency.
|
|
216
|
+
|
|
217
|
+
#### ✅ Use case
|
|
218
|
+
- Modal
|
|
219
|
+
- Drawer / Sidebar
|
|
220
|
+
- Toast / Snackbar
|
|
221
|
+
- Tooltip
|
|
222
|
+
- Dropdown
|
|
223
|
+
- Conditional UI
|
|
224
|
+
---
|
|
102
225
|
|
|
103
|
-
|
|
104
|
-
// const nextIndex = (animationIndex + 1) % AnimationsForChaining.length;
|
|
105
|
-
// setAnimationIndex(nextIndex);
|
|
106
|
-
// setAnimationType(AnimationsForChaining[nextIndex]);
|
|
107
|
-
// };
|
|
226
|
+
#### 📌 Basic usage
|
|
108
227
|
|
|
228
|
+
```tsx
|
|
229
|
+
import { AnimatePresence } from "react-animate-z";
|
|
230
|
+
|
|
231
|
+
function Example({ open }: { open: boolean }) {
|
|
109
232
|
return (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<AnimateTyping
|
|
120
|
-
heading="Fast typing:"
|
|
121
|
-
dataText={["speed x2", "super fast!"]}
|
|
122
|
-
typingSpeed={50}
|
|
123
|
-
deletingSpeed={20}
|
|
124
|
-
pauseTime={1000}
|
|
125
|
-
/>
|
|
126
|
-
</>
|
|
233
|
+
<AnimatePresence
|
|
234
|
+
show={open}
|
|
235
|
+
enter="fadeIn"
|
|
236
|
+
exit="fadeOut"
|
|
237
|
+
duration={300}
|
|
238
|
+
>
|
|
239
|
+
<div>Hello</div>
|
|
240
|
+
</AnimatePresence>
|
|
127
241
|
);
|
|
128
|
-
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
---
|
|
129
246
|
|
|
130
|
-
|
|
247
|
+
#### 🔥 Example: Modal
|
|
248
|
+
|
|
249
|
+
```tsx
|
|
250
|
+
<AnimatePresence
|
|
251
|
+
show={open}
|
|
252
|
+
enter="zoomIn"
|
|
253
|
+
exit="fadeOut"
|
|
254
|
+
duration={250}
|
|
255
|
+
>
|
|
256
|
+
<div className="modal" />
|
|
257
|
+
</AnimatePresence>
|
|
131
258
|
```
|
|
132
259
|
|
|
133
260
|
---
|
|
134
261
|
|
|
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
|
-
- flashPulse
|
|
177
|
-
|
|
178
|
-
#### 🎈 Float
|
|
179
|
-
|
|
180
|
-
- float
|
|
181
|
-
- floatSway
|
|
182
|
-
- floatHorizontal
|
|
183
|
-
- floatCircular
|
|
184
|
-
- floatWiggle
|
|
185
|
-
|
|
186
|
-
#### 💡 Glow
|
|
187
|
-
|
|
188
|
-
- glow
|
|
189
|
-
- glowTextFlicker
|
|
190
|
-
- glowRainbow
|
|
191
|
-
- glowBreathing
|
|
192
|
-
- glowGlitch
|
|
193
|
-
|
|
194
|
-
#### 🍮 Jelly
|
|
195
|
-
|
|
196
|
-
- jelly
|
|
197
|
-
- jellyX
|
|
198
|
-
- jellyY
|
|
199
|
-
- jellyIn
|
|
200
|
-
- jellyOut
|
|
201
|
-
|
|
202
|
-
#### 🌑 Shadow / Spin / Swing / Orbit
|
|
203
|
-
|
|
204
|
-
- shadow
|
|
205
|
-
- shadowText
|
|
206
|
-
- shadowPulse
|
|
207
|
-
- shadowNeon
|
|
208
|
-
- spin
|
|
209
|
-
- spin3D
|
|
210
|
-
- spinX
|
|
211
|
-
- spinBounce
|
|
212
|
-
- swing
|
|
213
|
-
- swingPivot
|
|
214
|
-
- swingX
|
|
215
|
-
- swingY
|
|
216
|
-
- orbit
|
|
217
|
-
- orbitEllipse
|
|
218
|
-
|
|
219
|
-
#### 💓 Pulse
|
|
220
|
-
|
|
221
|
-
- pulse
|
|
222
|
-
- pulseInOut
|
|
223
|
-
- pulseFade
|
|
224
|
-
- pulseFast
|
|
225
|
-
- pulseColor
|
|
226
|
-
|
|
227
|
-
#### 🌫 Fade
|
|
228
|
-
|
|
229
|
-
- fadeIn
|
|
230
|
-
- fadeOut
|
|
231
|
-
- fadeInFromLeft
|
|
232
|
-
- fadeInFromRight
|
|
233
|
-
- fadeInFromTop
|
|
234
|
-
- fadeInFromBottom
|
|
235
|
-
- fadeOutToLeft
|
|
236
|
-
- fadeOutToRight
|
|
237
|
-
- fadeOutToTop
|
|
238
|
-
- fadeOutToBottom
|
|
239
|
-
- fadeInZoom
|
|
240
|
-
- fadeOutZoom
|
|
241
|
-
- fadeInRotate
|
|
242
|
-
- fadeOutRotate
|
|
243
|
-
- fadeInSkew
|
|
244
|
-
- fadeOutSkew
|
|
245
|
-
- fadeInFlipX
|
|
246
|
-
- fadeOutFlipX
|
|
247
|
-
- fadeInFlipY
|
|
248
|
-
- fadeOutFlipY
|
|
249
|
-
- fadeInPerspective
|
|
250
|
-
- fadeOutPerspective
|
|
251
|
-
|
|
252
|
-
#### 🤯 Squeeze / Shake
|
|
253
|
-
|
|
254
|
-
- squeezeMix
|
|
255
|
-
- squeezeHorizontal
|
|
256
|
-
- squeezeVertical
|
|
257
|
-
- squeezeDiagonal
|
|
258
|
-
- squeezePulse
|
|
259
|
-
- squeezeBounce
|
|
260
|
-
- squeezeElastic
|
|
261
|
-
- squeezeFlash
|
|
262
|
-
- shakeMix
|
|
263
|
-
- shakeHorizontal
|
|
264
|
-
- shakeVertical
|
|
265
|
-
- shakeDiagonal
|
|
266
|
-
- shakeQuick
|
|
267
|
-
- shakeRotate
|
|
268
|
-
- shakeSkew
|
|
269
|
-
- shakeBounce
|
|
270
|
-
- shakeCrazy
|
|
271
|
-
- squeezeThenShakeX
|
|
272
|
-
- shakeYThenSqueeze
|
|
273
|
-
- squeezeShakeCrazy
|
|
274
|
-
|
|
275
|
-
#### 📥 Slide
|
|
276
|
-
|
|
277
|
-
- slideInFromLeft
|
|
278
|
-
- slideInFromRight
|
|
279
|
-
- slideOutToLeft
|
|
280
|
-
- slideOutToRight
|
|
281
|
-
- slideInFromTop
|
|
282
|
-
- slideInFromBottom
|
|
283
|
-
- slideOutToTop
|
|
284
|
-
- slideOutToBottom
|
|
285
|
-
- slideInFromLeftOvershoot
|
|
286
|
-
- slideInFromRightOvershoot
|
|
287
|
-
- slideOutToLeftOvershoot
|
|
288
|
-
- slideOutToRightOvershoot
|
|
289
|
-
- slideInFromTopOvershoot
|
|
290
|
-
- slideInFromBottomOvershoot
|
|
291
|
-
- slideOutToTopOvershoot
|
|
292
|
-
- slideOutToBottomOvershoot
|
|
293
|
-
|
|
294
|
-
#### 🔄 Flip
|
|
295
|
-
|
|
296
|
-
- flip
|
|
297
|
-
- flipIn
|
|
298
|
-
- flipOut
|
|
299
|
-
- flipSlowDown
|
|
300
|
-
- flipToLeft
|
|
301
|
-
- flipToRight
|
|
302
|
-
- flipFromTop
|
|
303
|
-
- flipToTop
|
|
304
|
-
- flipToBottom
|
|
305
|
-
- flipFromBottom
|
|
306
|
-
- flipFromLeftToCenter
|
|
307
|
-
- flipFromRightToCenter
|
|
308
|
-
- flipRich
|
|
309
|
-
- flipToTopRich
|
|
310
|
-
- flipToBottomRich
|
|
311
|
-
- flipToTopLeftRich
|
|
312
|
-
- flipToRightRich
|
|
313
|
-
- flipFromTopRich
|
|
314
|
-
- flipFromBottomRich
|
|
315
|
-
- flipFromLeftToCenterRich
|
|
316
|
-
- flipFromRightToCenterRich
|
|
317
|
-
|
|
318
|
-
#### 📂 Fold / Unfold
|
|
319
|
-
|
|
320
|
-
- fold
|
|
321
|
-
- foldDeep
|
|
322
|
-
- unfold
|
|
323
|
-
- unfoldDeep
|
|
324
|
-
|
|
325
|
-
#### 🪝 Hang On
|
|
326
|
-
|
|
327
|
-
- hangOnLeft
|
|
328
|
-
- hangOnRight
|
|
329
|
-
- hangOnTop
|
|
330
|
-
- hangOnBottom
|
|
331
|
-
- hangOnLeftSwing
|
|
332
|
-
- hangOnRightSwing
|
|
333
|
-
- hangOnTopSwing
|
|
334
|
-
- hangOnBottomSwing
|
|
335
|
-
- hangOnOscillate
|
|
336
|
-
- hangOnDrop
|
|
337
|
-
|
|
338
|
-
#### 🔍 Zoom
|
|
339
|
-
|
|
340
|
-
- zoomIn
|
|
341
|
-
- zoomOut
|
|
342
|
-
- zoomInFromLeft
|
|
343
|
-
- zoomInFromRight
|
|
344
|
-
- zoomInFromTop
|
|
345
|
-
- zoomInFromBottom
|
|
346
|
-
- zoomOutToLeft
|
|
347
|
-
- zoomOutToRight
|
|
348
|
-
- zoomOutToTop
|
|
349
|
-
- zoomOutToBottom
|
|
350
|
-
|
|
351
|
-
#### 🌀 Rotate
|
|
352
|
-
|
|
353
|
-
- rotateCW
|
|
354
|
-
- rotateACW
|
|
355
|
-
- rotateSlowDown
|
|
356
|
-
- rotateX
|
|
357
|
-
- rotateY
|
|
358
|
-
- rotateFromLeft
|
|
359
|
-
- rotateFromRight
|
|
360
|
-
- rotateToLeft
|
|
361
|
-
- rotateToRight
|
|
362
|
-
- rotateFromTop
|
|
363
|
-
- rotateFromBottom
|
|
364
|
-
- rotateToTop
|
|
365
|
-
- rotateToBottom
|
|
366
|
-
|
|
367
|
-
#### 🎉 Fun / Attention
|
|
368
|
-
|
|
369
|
-
- heartBeat
|
|
370
|
-
- tada
|
|
371
|
-
- hinge
|
|
372
|
-
- lightSpeedInLeft
|
|
373
|
-
- lightSpeedOutRight
|
|
374
|
-
- popIn
|
|
375
|
-
- popOut
|
|
376
|
-
- popBounceIn
|
|
377
|
-
- popBounceOut
|
|
378
|
-
- popUpIn
|
|
379
|
-
- popUpOut
|
|
380
|
-
- popRotateIn
|
|
381
|
-
- popRotateOut
|
|
382
|
-
- popBlurIn
|
|
383
|
-
- popBlurOut
|
|
384
|
-
- popLeftIn
|
|
385
|
-
- popLeftOut
|
|
386
|
-
- popRightIn
|
|
387
|
-
- popRightOut
|
|
388
|
-
- rubberBand
|
|
389
|
-
- jello
|
|
390
|
-
- wobble
|
|
391
|
-
- rollIn
|
|
392
|
-
- jackInTheBox
|
|
262
|
+
|
|
263
|
+
#### 🧠 Behavior timeline
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
show = false
|
|
267
|
+
└─ nothing rendered
|
|
268
|
+
|
|
269
|
+
show = true
|
|
270
|
+
└─ mount
|
|
271
|
+
└─ enter animation
|
|
272
|
+
|
|
273
|
+
show = false
|
|
274
|
+
└─ exit animation
|
|
275
|
+
└─ wait(duration)
|
|
276
|
+
└─ unmount
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
- Declarative intent, not keyframes
|
|
280
|
+
- Timeline-based composition
|
|
281
|
+
- Ref-first, framework-agnostic core
|
|
282
|
+
- Safe defaults for accessibility
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## 🧩 Additional APIs
|
|
287
|
+
|
|
288
|
+
#### Components
|
|
289
|
+
- AnimateHost: Low-level animation context host, used for coordinating multiple animated elements.
|
|
290
|
+
- WrapperAnimate: Conditional animation wrapper without breaking DOM structure.
|
|
291
|
+
- TypingText: Lightweight typing animation for inline text (simpler than AnimateTyping).
|
|
292
|
+
|
|
293
|
+
#### Hooks
|
|
294
|
+
- useAnimateController: Imperative control over animation lifecycle (play, stop, reset).
|
|
295
|
+
- useAnimateSequence: Timeline logic as a hook for reusable animation flows.
|
|
296
|
+
- useRandomAnimateNoRepeat: Random animation helper with no immediate repetition.
|
|
297
|
+
- useRecipe: Semantic, state-driven animation (loading, success, error).
|
|
298
|
+
|
|
299
|
+
> These APIs are intended for advanced or compositional use cases.
|
|
300
|
+
> Most applications only need <Animate /> and useAnimate().
|
|
301
|
+
|
|
302
|
+
---
|
|
393
303
|
|
|
394
304
|
## 📜 License
|
|
395
305
|
|
|
396
|
-
MIT
|
|
306
|
+
MIT
|