Skip to content

Commit d7e3f4e

Browse files
authored
Update README.md
1 parent 306f79c commit d7e3f4e

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ yarn add vollborn/vue-animations
1717
## Usage
1818
To use the scroll animations, you need to import the package to your project beforehand.
1919
```js
20-
import 'vue-animations';
20+
import VueAnimations from 'vue-animations';
2121
```
2222

2323
Then you need to add two classes to your element.
@@ -29,14 +29,31 @@ Then you need to add two classes to your element.
2929
</div>
3030
```
3131

32+
### Effects
33+
3234
Currently available effect classes:
3335
- fade-in
3436
- fade-from-left
3537
- fade-from-right
3638
- size-fade-in
3739
- draw-to-right
3840

39-
The classes *.fade-from-left* and *.fade-from-right* automatically change to *.fade-in* at 800px screen width for better mobile support.
41+
The classes *.fade-from-left* and *.fade-from-right* automatically change to *.fade-in* at 600px screen width for better mobile support.
42+
43+
### Element list
44+
45+
The element list is automatically updated on every scroll event. You can disable this to improve performance.
46+
```js
47+
VueAnimations.setAutomaticElementListReload(false);
48+
```
49+
50+
If disabled, the list needs to updated manually, otherwise the animations *will not* work.
51+
You can do that with the reloadElements function:
52+
```js
53+
VueAnimations.reloadElements()
54+
```
55+
56+
For the best possible performance the list should be updated on every component mount, that implements any animations.
4057

4158

4259
## More Effects

0 commit comments

Comments
 (0)