You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Tip**: Make sure there are no animations or CSS transitions applied or conflicting with elements to animate, they might interfere and mess things up. For example, avoid specifying CSS transitions globally.
102
102
103
+
<palign="right"><small><ahref="#table-of-contents"><u>↑ Table of Contents</u></a></small></p>
104
+
103
105
#### Animate on initial load
104
106
To animate elements on initial load, use the `appear` directive to trigger animations without conditional rendering with `v-if`:
105
107
```html
@@ -110,7 +112,7 @@ To animate elements on initial load, use the `appear` directive to trigger anima
@@ -121,6 +123,8 @@ Through 'direct invocation,' you can specify animation options by setting datase
121
123
`data-av-[option property]="..."`
122
124
> Options using dataset attributes apply to both @enter and @leave animations except [data-vn-enter-ease](#enterease) and [data-vn-leave-ease](leaveease).
123
125
126
+
<palign="right"><small><ahref="#table-of-contents"><u>↑ Table of Contents</u></a></small></p>
127
+
124
128
125
129
### 2. Through function invocation.
126
130
This method involves handling animations within the `<script>`, offering greater control, such as adding fallbacks and handling `async` operations.
<p align="right"><small><a href="#table-of-contents">Table of Contents</a></small></p>
194
+
<p align="right"><small><a href="#table-of-contents"><u>↑ Table of Contents</u></a></small></p>
191
195
192
196
### Asynchronous Support <a id="asynchronous-support-anim"></a>
193
197
All animations return a Promise that resolves when the animation completes, allowing you to handle asynchronous operations using `await` or by chaining `.then()` and `.catch()`:
👆 In this example, only the data-av-delay option from dataset attributes will be applied, as the duration and ease options are specified in the function invocation.
347
-
<p align="right"><small><a href="#table-of-contents">Table of Contents</a></small></p>
351
+
<p align="right"><small><a href="#table-of-contents"><u>↑ Table of Contents</u></a></small></p>
You can pass options to customize the animation behavior. For example:
435
439
```javascript
436
440
headShake(el, {
@@ -468,7 +472,7 @@ headShake(el, {
468
472
469
473
> Delay before the animation in seconds. Numbers below 0 denotes milliseconds(e.g 0.3). Also specify repeat delay of the animation when is on loop.
470
474
471
-
<p align="right"><small><a href="#table-of-contents">Table of Contents</a></small></p>
475
+
<p align="right"><small><a href="#table-of-contents"><u>↑ Table of Contents</u></a></small></p>
472
476
473
477
### Stopping Attention Seekers
474
478
Attention seekers provide a `kill()` method to stop ongoing animations, especially when set to loop. This allows you to halt the animation at any time.
@@ -511,7 +515,7 @@ onMounted(() => {
511
515
512
516
> **Tip**: Attention seeker animations also work with Transition component events. For example `@enter="jello"`.
513
517
514
-
<p align="right"><small><a href="#table-of-contents">Table of Contents</a></small></p>
518
+
<p align="right"><small><a href="#table-of-contents"><u>↑ Table of Contents</u></a></small></p>
> Keep in mind that the animation properties defined for 'enter' dictate how the element appears when it enters, while those specified for 'leave' determine how it disappears.
564
568
565
-
<p align="right"><small><a href="#table-of-contents">Table of Contents</a></small></p>
569
+
<p align="right"><small><a href="#table-of-contents"><u>↑ Table of Contents</u></a></small></p>
566
570
567
571
### Asynchronous Support <a id="asynchronous-support-custom"></a>
568
572
The `customAnimation()` method returns a Promise that resolves when the animation is complete, allowing you to use `await` or chain `.then()` and `.catch()` for asynchronous operations:
0 commit comments