react-awesome-reveal 3.7.1 → 4.0.0-beta.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/dist/main.js +2336 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +2303 -0
- package/dist/module.js.map +1 -0
- package/dist/types.d.ts +185 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +31 -59
- package/README.md +0 -227
- package/dist/Reveal.d.ts +0 -70
- package/dist/animations/attention_seekers/bounce.d.ts +0 -5
- package/dist/animations/attention_seekers/flash.d.ts +0 -5
- package/dist/animations/attention_seekers/headShake.d.ts +0 -5
- package/dist/animations/attention_seekers/heartBeat.d.ts +0 -5
- package/dist/animations/attention_seekers/index.d.ts +0 -13
- package/dist/animations/attention_seekers/jello.d.ts +0 -5
- package/dist/animations/attention_seekers/pulse.d.ts +0 -5
- package/dist/animations/attention_seekers/rubberBand.d.ts +0 -5
- package/dist/animations/attention_seekers/shake.d.ts +0 -5
- package/dist/animations/attention_seekers/shakeX.d.ts +0 -5
- package/dist/animations/attention_seekers/shakeY.d.ts +0 -5
- package/dist/animations/attention_seekers/swing.d.ts +0 -5
- package/dist/animations/attention_seekers/tada.d.ts +0 -5
- package/dist/animations/attention_seekers/wobble.d.ts +0 -5
- package/dist/animations/bouncing_entrances/bounceIn.d.ts +0 -5
- package/dist/animations/bouncing_entrances/bounceInDown.d.ts +0 -5
- package/dist/animations/bouncing_entrances/bounceInLeft.d.ts +0 -5
- package/dist/animations/bouncing_entrances/bounceInRight.d.ts +0 -5
- package/dist/animations/bouncing_entrances/bounceInUp.d.ts +0 -5
- package/dist/animations/bouncing_entrances/index.d.ts +0 -5
- package/dist/animations/bouncing_exits/bounceOut.d.ts +0 -5
- package/dist/animations/bouncing_exits/bounceOutDown.d.ts +0 -5
- package/dist/animations/bouncing_exits/bounceOutLeft.d.ts +0 -5
- package/dist/animations/bouncing_exits/bounceOutRight.d.ts +0 -5
- package/dist/animations/bouncing_exits/bounceOutUp.d.ts +0 -5
- package/dist/animations/bouncing_exits/index.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeIn.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInBottomLeft.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInBottomRight.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInDown.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInDownBig.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInLeft.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInLeftBig.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInRight.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInRightBig.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInTopLeft.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInTopRight.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInUp.d.ts +0 -5
- package/dist/animations/fading_entrances/fadeInUpBig.d.ts +0 -5
- package/dist/animations/fading_entrances/index.d.ts +0 -13
- package/dist/animations/fading_exits/fadeOut.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutBottomLeft.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutBottomRight.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutDown.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutDownBig.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutLeft.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutLeftBig.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutRight.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutRightBig.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutTopLeft.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutTopRight.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutUp.d.ts +0 -5
- package/dist/animations/fading_exits/fadeOutUpBig.d.ts +0 -5
- package/dist/animations/fading_exits/index.d.ts +0 -13
- package/dist/animations/flippers/flip.d.ts +0 -5
- package/dist/animations/flippers/flipInX.d.ts +0 -5
- package/dist/animations/flippers/flipInY.d.ts +0 -5
- package/dist/animations/flippers/flipOutX.d.ts +0 -5
- package/dist/animations/flippers/flipOutY.d.ts +0 -5
- package/dist/animations/flippers/index.d.ts +0 -5
- package/dist/animations/rotating_entrances/index.d.ts +0 -5
- package/dist/animations/rotating_entrances/rotateIn.d.ts +0 -5
- package/dist/animations/rotating_entrances/rotateInDownLeft.d.ts +0 -5
- package/dist/animations/rotating_entrances/rotateInDownRight.d.ts +0 -5
- package/dist/animations/rotating_entrances/rotateInUpLeft.d.ts +0 -5
- package/dist/animations/rotating_entrances/rotateInUpRight.d.ts +0 -5
- package/dist/animations/rotating_exits/index.d.ts +0 -5
- package/dist/animations/rotating_exits/rotateOut.d.ts +0 -5
- package/dist/animations/rotating_exits/rotateOutDownLeft.d.ts +0 -5
- package/dist/animations/rotating_exits/rotateOutDownRight.d.ts +0 -5
- package/dist/animations/rotating_exits/rotateOutUpLeft.d.ts +0 -5
- package/dist/animations/rotating_exits/rotateOutUpRight.d.ts +0 -5
- package/dist/animations/sliding_entrances/index.d.ts +0 -4
- package/dist/animations/sliding_entrances/slideInDown.d.ts +0 -5
- package/dist/animations/sliding_entrances/slideInLeft.d.ts +0 -5
- package/dist/animations/sliding_entrances/slideInRight.d.ts +0 -5
- package/dist/animations/sliding_entrances/slideInUp.d.ts +0 -5
- package/dist/animations/sliding_exits/index.d.ts +0 -4
- package/dist/animations/sliding_exits/slideOutDown.d.ts +0 -5
- package/dist/animations/sliding_exits/slideOutLeft.d.ts +0 -5
- package/dist/animations/sliding_exits/slideOutRight.d.ts +0 -5
- package/dist/animations/sliding_exits/slideOutUp.d.ts +0 -5
- package/dist/animations/specials/hinge.d.ts +0 -5
- package/dist/animations/specials/index.d.ts +0 -4
- package/dist/animations/specials/jackInTheBox.d.ts +0 -5
- package/dist/animations/specials/rollIn.d.ts +0 -5
- package/dist/animations/specials/rollOut.d.ts +0 -5
- package/dist/animations/zooming_entrances/index.d.ts +0 -5
- package/dist/animations/zooming_entrances/zoomIn.d.ts +0 -5
- package/dist/animations/zooming_entrances/zoomInDown.d.ts +0 -5
- package/dist/animations/zooming_entrances/zoomInLeft.d.ts +0 -5
- package/dist/animations/zooming_entrances/zoomInRight.d.ts +0 -5
- package/dist/animations/zooming_entrances/zoomInUp.d.ts +0 -5
- package/dist/animations/zooming_exits/index.d.ts +0 -5
- package/dist/animations/zooming_exits/zoomOut.d.ts +0 -5
- package/dist/animations/zooming_exits/zoomOutDown.d.ts +0 -5
- package/dist/animations/zooming_exits/zoomOutLeft.d.ts +0 -5
- package/dist/animations/zooming_exits/zoomOutRight.d.ts +0 -5
- package/dist/animations/zooming_exits/zoomOutUp.d.ts +0 -5
- package/dist/components/AttentionSeeker.d.ts +0 -12
- package/dist/components/Bounce.d.ts +0 -17
- package/dist/components/Fade.d.ts +0 -22
- package/dist/components/Flip.d.ts +0 -17
- package/dist/components/Hinge.d.ts +0 -5
- package/dist/components/JackInTheBox.d.ts +0 -5
- package/dist/components/Roll.d.ts +0 -11
- package/dist/components/Rotate.d.ts +0 -17
- package/dist/components/Slide.d.ts +0 -17
- package/dist/components/Zoom.d.ts +0 -17
- package/dist/index.d.ts +0 -12
- package/dist/index.js +0 -8
- package/dist/react-awesome-reveal.cjs.development.js +0 -1186
- package/dist/react-awesome-reveal.cjs.development.js.map +0 -1
- package/dist/react-awesome-reveal.cjs.production.min.js +0 -2
- package/dist/react-awesome-reveal.cjs.production.min.js.map +0 -1
- package/dist/react-awesome-reveal.esm.js +0 -1173
- package/dist/react-awesome-reveal.esm.js.map +0 -1
- package/dist/utils/animations.d.ts +0 -7
- package/dist/utils/js-types.d.ts +0 -2
package/README.md
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
# React Awesome Reveal
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/react-awesome-reveal/v/latest)
|
|
4
|
-
[](https://github.com/dennismorello/react-awesome-reveal/commits/master)
|
|
5
|
-
[](https://www.npmjs.com/package/react-awesome-reveal/v/latest)
|
|
6
|
-
[](https://bundlephobia.com/result?p=react-awesome-reveal@latest)
|
|
7
|
-
[](https://www.npmjs.com/package/react-awesome-reveal/v/latest)
|
|
8
|
-
[](https://openbase.io/js/react-awesome-reveal?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge)
|
|
9
|
-
|
|
10
|
-
[React Awesome Reveal](https://github.com/dennismorello/react-awesome-reveal) is a library for React apps written in TypeScript that adds reveal animations using the Intersection Observer API to detect when the elements appear in the viewport. Animations are internally provided by [Emotion](https://emotion.sh) and implemented as CSS Animations to benefit from hardware acceleration.
|
|
11
|
-
|
|
12
|
-
## Table Of Contents
|
|
13
|
-
|
|
14
|
-
- [Features](#features)
|
|
15
|
-
- [Demo](#demo)
|
|
16
|
-
- [Installation](#installation)
|
|
17
|
-
- [Quick Start](#quick-start)
|
|
18
|
-
- [Supported Effects](#supported-effects)
|
|
19
|
-
- [Attention Seekers](#attention-seekers)
|
|
20
|
-
- [Props](#props)
|
|
21
|
-
- [Example](#example)
|
|
22
|
-
- [Chaining Multiple Animations](#chaining-multiple-animations)
|
|
23
|
-
- [Custom Animations](#custom-animations)
|
|
24
|
-
- [Other Props](#other-props)
|
|
25
|
-
- [Intersection Observer](#intersection-observer)
|
|
26
|
-
- [Polyfill](#polyfill)
|
|
27
|
-
- [Past Releases](#past-releases)
|
|
28
|
-
- [License](#license)
|
|
29
|
-
|
|
30
|
-
## Features
|
|
31
|
-
|
|
32
|
-
- 🎁 **Modern stack** – It is built for modern React
|
|
33
|
-
- 🏷 **TypeScript support** – It is written in TypeScript to improve the DX
|
|
34
|
-
- 🍃 **Lightweight** – Very little footprint on your project and no other dependencies required
|
|
35
|
-
- ⚙️ **Uses native APIs** – Intersection Observer and CSS Animations are now supported by all major browsers
|
|
36
|
-
- 🚀 **Fast** – Buttery smooth experience thanks to the use of native asynchronous APIs and hardware acceleration
|
|
37
|
-
- 💅 **Fully customizable** – Define custom animations and let the library render them
|
|
38
|
-
- 💻 **SSR support** – Server Side Rendering works out-of-the-box
|
|
39
|
-
- 🌳 **Tree-shakeable** – Only the parts you use will be included in your final bundle
|
|
40
|
-
|
|
41
|
-
## Demo
|
|
42
|
-
|
|
43
|
-
You can find a demo website [here](https://react-awesome-reveal.morello.dev).
|
|
44
|
-
|
|
45
|
-
## Installation
|
|
46
|
-
|
|
47
|
-
To add this package as a dependency to your app, simply run
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
npm install react-awesome-reveal --save
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
or, if you are using Yarn (as I strongly suggest):
|
|
54
|
-
|
|
55
|
-
```sh
|
|
56
|
-
yarn add react-awesome-reveal
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Quick Start
|
|
60
|
-
|
|
61
|
-
Import effects from [React Awesome Reveal](https://www.npmjs.com/package/react-awesome-reveal) to your React component, for example the `Fade` effect:
|
|
62
|
-
|
|
63
|
-
```js
|
|
64
|
-
import { Fade } from "react-awesome-reveal";
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Then simply wrap the components you want to animate:
|
|
68
|
-
|
|
69
|
-
```jsx
|
|
70
|
-
<Fade>
|
|
71
|
-
<p>I will gently appear as I enter the viewport</p>
|
|
72
|
-
</Fade>
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Supported Effects
|
|
76
|
-
|
|
77
|
-
The effects currently supported are `Bounce`, `Fade`, `Flip`, `Hinge`, `JackInTheBox`, `Roll`, `Rotate`, `Slide` and `Zoom`. Refer to the [Animate.css](https://animate.style) documentation for the details.
|
|
78
|
-
|
|
79
|
-
### Attention Seekers
|
|
80
|
-
|
|
81
|
-
Since version 3, attention seeker animations are wrapped by the `AttentionSeeker` component, which accepts a prop called `effect` that specifies the animation to render (defaults to `"bounce”`). The supported effects are: `”bounce"`, `"flash"`, `"headShake”`, `"heartBeat"`, `"jello”`, `"pulse"`, `"rubberBand"`, `“shake”`, `“shakeX"`, `"shakeY”`, `"swing”`, `"tada"` and `“wobble”`.
|
|
82
|
-
|
|
83
|
-
Again, refer to the [Animate.css](https://animate.style) documentation for the details.
|
|
84
|
-
|
|
85
|
-
### Props
|
|
86
|
-
|
|
87
|
-
You can pass the following props to the animation components to customize the behavior:
|
|
88
|
-
|
|
89
|
-
| Prop | Description | Values | Default |
|
|
90
|
-
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
91
|
-
| `cascade` | If set, each child of a reveal animation automatically get assigned a delay that takes into account their predecessor (child `i` enters the viewport after `i * delay * damping` milliseconds) – useful for animating list items. | `true` or `false` | `false` |
|
|
92
|
-
| `damping` | Factor that affects the delay that each animated component in a cascade animation will be assigned. If `damping = 1` then the delay will be equal to the animation duration; if `damping < 1` then the delay will be lower than the animation duration; if `damping > 1` then the delay will be greater than the animation duration. | `number` | `0.5` (meaning that the delay will be half of the animation duration) |
|
|
93
|
-
| `direction` | Origin of the animation (where applicable). | Usually `"down"`, `"left"`, `"right"` or `"up"`, with some exceptions documented in the code | `undefined` |
|
|
94
|
-
| `delay` | Time to wait before the animation starts (in milliseconds). | `number` | `0` |
|
|
95
|
-
| `duration` | The animation duration (milliseconds). | `number` | `1000` |
|
|
96
|
-
| `fraction` | How much an element should be in viewport before the animation is triggered. | `number` between `0` and `1` | `0` |
|
|
97
|
-
| `triggerOnce` | Specifies if the animation should run only once or everytime an element enters/exits/re-enters the viewport. | `true` or `false` | `false` |
|
|
98
|
-
| `className` | The class names to add to the container element. | `string` | `undefined` |
|
|
99
|
-
| `style` | The inline styles to add to the container element. | `React.CSSProperties` | `undefined` |
|
|
100
|
-
| `childClassName` | The class names to add to the child element. | `string` | `undefined` |
|
|
101
|
-
| `childStyle` | The inline styles to add to the child element. | `React.CSSProperties` | `undefined` |
|
|
102
|
-
| `onVisibilityChange` | Callback executed when the element enters or leaves the viewport. If more than one element is being animated, this function is called on each element. | `(inView: boolean, entry: IntersectionObserverEntry) => void` | `undefined` |
|
|
103
|
-
|
|
104
|
-
### Example
|
|
105
|
-
|
|
106
|
-
To trigger the animation only the first time an element enters the viewport:
|
|
107
|
-
|
|
108
|
-
```jsx
|
|
109
|
-
<Slide triggerOnce>
|
|
110
|
-
<p>I will animate only the first time you see me</p>
|
|
111
|
-
</Slide>
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### Chaining Multiple Animations
|
|
115
|
-
|
|
116
|
-
To chain together multiple animations, set the `cascade` prop to `true`:
|
|
117
|
-
|
|
118
|
-
```jsx
|
|
119
|
-
<Fade cascade>
|
|
120
|
-
<p>I enter first...</p>
|
|
121
|
-
<p>...then comes my turn...</p>
|
|
122
|
-
<p>...and finally you see me!</p>
|
|
123
|
-
</Fade>
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
This is _almost_ equivalent to
|
|
127
|
-
|
|
128
|
-
```jsx
|
|
129
|
-
<Fade>
|
|
130
|
-
<p>I enter first...</p>
|
|
131
|
-
</Fade>
|
|
132
|
-
<Fade delay={1000}>
|
|
133
|
-
<p>...then comes my turn...</p>
|
|
134
|
-
</Fade>
|
|
135
|
-
<Fade delay={2000}>
|
|
136
|
-
<p>...and finally you see me!</p>
|
|
137
|
-
</Fade>
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
with the exception that, since each `Fade` component creates an isolated visibility context, in the second snippet every `p` will be shown only if they are inside the viewport (after the specified delay).
|
|
141
|
-
|
|
142
|
-
## Custom Animations
|
|
143
|
-
|
|
144
|
-
Starting from version 3.2.0, you can define custom animations! Simply import the `Reveal` component (which is the default export of the library – give it the name you want) and pass it a `keyframes` prop:
|
|
145
|
-
|
|
146
|
-
```jsx
|
|
147
|
-
import React from "react";
|
|
148
|
-
import Reveal from "react-awesome-reveal";
|
|
149
|
-
import { keyframes } from "@emotion/react";
|
|
150
|
-
|
|
151
|
-
const customAnimation = keyframes`
|
|
152
|
-
from {
|
|
153
|
-
opacity: 0;
|
|
154
|
-
transform: translate3d(-200px, -100px, 0);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
to {
|
|
158
|
-
opacity: 1;
|
|
159
|
-
transform: translate3d(0, 0, 0);
|
|
160
|
-
}
|
|
161
|
-
`;
|
|
162
|
-
|
|
163
|
-
function MyAnimatedComponent({ children }) {
|
|
164
|
-
return (
|
|
165
|
-
<Reveal keyframes={customAnimation}>
|
|
166
|
-
{children}
|
|
167
|
-
</Reveal>;
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
If no `keyframes` prop is passed, the default rendered animation is a fading entrance from the left (equivalent to `<Fade direction="left">...</Fade>`).
|
|
173
|
-
|
|
174
|
-
### Other Props
|
|
175
|
-
|
|
176
|
-
You can also pass these props to `Reveal`:
|
|
177
|
-
|
|
178
|
-
- `cascade`
|
|
179
|
-
- `damping`
|
|
180
|
-
- `delay`
|
|
181
|
-
- `duration`
|
|
182
|
-
- `fraction`
|
|
183
|
-
- `triggerOnce`
|
|
184
|
-
- `className` and `childClassName`
|
|
185
|
-
- `style` and `childStyle`
|
|
186
|
-
- `onVisibilityChange`
|
|
187
|
-
|
|
188
|
-
## Intersection Observer
|
|
189
|
-
|
|
190
|
-
[Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) is the API used to determine if an element is inside the viewport or not. [Browser support](http://caniuse.com/#feat=intersectionobserver) is really good – with [Safari adding support in 12.1](https://webkit.org/blog/8718/new-webkit-features-in-safari-12-1), all major browsers now support Intersection Observers natively.
|
|
191
|
-
|
|
192
|
-
If you need to support old browsers, add the polyfill for the Intersection Observer API.
|
|
193
|
-
|
|
194
|
-
### Polyfill
|
|
195
|
-
|
|
196
|
-
You can add the [polyfill](https://www.npmjs.com/package/intersection-observer) directly or use a service like [polyfill.io](https://polyfill.io/v2/docs) to add it when needed.
|
|
197
|
-
|
|
198
|
-
```sh
|
|
199
|
-
yarn add intersection-observer
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
Then import it in your app:
|
|
203
|
-
|
|
204
|
-
```javascript
|
|
205
|
-
import "intersection-observer";
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
If you are using Webpack (or similar) you could use [dynamic imports](https://webpack.js.org/guides/code-splitting/#dynamic-imports) to load the polyfill only if needed. A basic implementation could look something like this:
|
|
209
|
-
|
|
210
|
-
```javascript
|
|
211
|
-
/**
|
|
212
|
-
* Do feature detection, to figure out which polyfills needs to be imported.
|
|
213
|
-
**/
|
|
214
|
-
async function loadPolyfills() {
|
|
215
|
-
if (typeof window.IntersectionObserver === "undefined") {
|
|
216
|
-
await import("intersection-observer");
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
## Past Releases
|
|
222
|
-
|
|
223
|
-
To see the documentation for previous versions, navigate through past tags in the GitHub's project repository and read the README for that specific version.
|
|
224
|
-
|
|
225
|
-
## License
|
|
226
|
-
|
|
227
|
-
Project source code is licensed under the MIT license. You are free to fork this repository, edit the code, share and use it both for non-commercial and commercial purposes.
|
package/dist/Reveal.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import { Interpolation, Theme } from "@emotion/react";
|
|
3
|
-
import { Keyframes } from "@emotion/serialize";
|
|
4
|
-
export interface RevealProps {
|
|
5
|
-
/**
|
|
6
|
-
* Stagger its children animations.
|
|
7
|
-
* @default false
|
|
8
|
-
*/
|
|
9
|
-
cascade?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Factor that affects the delay that each animated element in a cascade animation will be assigned.
|
|
12
|
-
* @default 0.5
|
|
13
|
-
*/
|
|
14
|
-
damping?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Initial delay, in milliseconds.
|
|
17
|
-
* @default 0
|
|
18
|
-
*/
|
|
19
|
-
delay?: number;
|
|
20
|
-
/**
|
|
21
|
-
* Animation duration, in milliseconds.
|
|
22
|
-
* @default 1000
|
|
23
|
-
*/
|
|
24
|
-
duration?: number;
|
|
25
|
-
/**
|
|
26
|
-
* Float number between 0 and 1 indicating how much the element should be in viewport before the animation is triggered.
|
|
27
|
-
* @default 0
|
|
28
|
-
*/
|
|
29
|
-
fraction?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Custom Emotion animation keyframes.
|
|
32
|
-
*/
|
|
33
|
-
keyframes?: Keyframes;
|
|
34
|
-
/**
|
|
35
|
-
* Specifies if the animation should run only once or everytime the element enters/exits/re-enters the viewport.
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
triggerOnce?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Custom Emotion styles.
|
|
41
|
-
*/
|
|
42
|
-
css?: Interpolation<Theme>;
|
|
43
|
-
/**
|
|
44
|
-
* Class names to add to the container element.
|
|
45
|
-
*/
|
|
46
|
-
className?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Inline styles to add to the container element.
|
|
49
|
-
*/
|
|
50
|
-
style?: React.CSSProperties;
|
|
51
|
-
/**
|
|
52
|
-
* Class names to add to the child element.
|
|
53
|
-
*/
|
|
54
|
-
childClassName?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Inline styles to add to the child element.
|
|
57
|
-
*/
|
|
58
|
-
childStyle?: React.CSSProperties;
|
|
59
|
-
/**
|
|
60
|
-
* Callback executed when the element enters or leaves the viewport.
|
|
61
|
-
* If more than one element is being animated, this function is called
|
|
62
|
-
* on each element.
|
|
63
|
-
*
|
|
64
|
-
* @param inView The current visibility flag.
|
|
65
|
-
* @param entry The current IntersectionObserverEntry.
|
|
66
|
-
*/
|
|
67
|
-
onVisibilityChange?(inView: boolean, entry: IntersectionObserverEntry): void;
|
|
68
|
-
}
|
|
69
|
-
declare const Reveal: FC<RevealProps>;
|
|
70
|
-
export default Reveal;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { default as bounce } from "./bounce";
|
|
2
|
-
export { default as flash } from "./flash";
|
|
3
|
-
export { default as headShake } from "./headShake";
|
|
4
|
-
export { default as heartBeat } from "./heartBeat";
|
|
5
|
-
export { default as jello } from "./jello";
|
|
6
|
-
export { default as pulse } from "./pulse";
|
|
7
|
-
export { default as rubberBand } from "./rubberBand";
|
|
8
|
-
export { default as shake } from "./shake";
|
|
9
|
-
export { default as shakeX } from "./shakeX";
|
|
10
|
-
export { default as shakeY } from "./shakeY";
|
|
11
|
-
export { default as swing } from "./swing";
|
|
12
|
-
export { default as tada } from "./tada";
|
|
13
|
-
export { default as wobble } from "./wobble";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as bounceIn } from "./bounceIn";
|
|
2
|
-
export { default as bounceInDown } from "./bounceInDown";
|
|
3
|
-
export { default as bounceInLeft } from "./bounceInLeft";
|
|
4
|
-
export { default as bounceInRight } from "./bounceInRight";
|
|
5
|
-
export { default as bounceInUp } from "./bounceInUp";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as bounceOut } from "./bounceOut";
|
|
2
|
-
export { default as bounceOutDown } from "./bounceOutDown";
|
|
3
|
-
export { default as bounceOutLeft } from "./bounceOutLeft";
|
|
4
|
-
export { default as bounceOutRight } from "./bounceOutRight";
|
|
5
|
-
export { default as bounceOutUp } from "./bounceOutUp";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { default as fadeIn } from "./fadeIn";
|
|
2
|
-
export { default as fadeInBottomLeft } from "./fadeInBottomLeft";
|
|
3
|
-
export { default as fadeInBottomRight } from "./fadeInBottomRight";
|
|
4
|
-
export { default as fadeInDown } from "./fadeInDown";
|
|
5
|
-
export { default as fadeInDownBig } from "./fadeInDownBig";
|
|
6
|
-
export { default as fadeInLeft } from "./fadeInLeft";
|
|
7
|
-
export { default as fadeInLeftBig } from "./fadeInLeftBig";
|
|
8
|
-
export { default as fadeInRight } from "./fadeInRight";
|
|
9
|
-
export { default as fadeInRightBig } from "./fadeInRightBig";
|
|
10
|
-
export { default as fadeInTopLeft } from "./fadeInTopLeft";
|
|
11
|
-
export { default as fadeInTopRight } from "./fadeInTopRight";
|
|
12
|
-
export { default as fadeInUp } from "./fadeInUp";
|
|
13
|
-
export { default as fadeInUpBig } from "./fadeInUpBig";
|