Skip to content

Commit a6cc6ff

Browse files
Refined attention seekers. Improved docs
1 parent f1b0ee7 commit a6cc6ff

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,32 @@ Traditional CSS animations often struggle with performance issues, especially on
3636

3737
## Live Demo
3838
### [See all available animations in the demo](https://animate4vue.netlify.app)
39-
---
4039
<br>
4140

4241
## Table of Contents
4342
- [Installation](#installation)
4443
- [Usage](#usage)
4544
- [Through direct invocation](#1-through-direct-invocation)
4645
- [Animate on initial load](#animate-on-initial-load)
47-
- [Setting Options](#setting-options-direct)
46+
- [Setting Options](#setting-options)
4847
- [Through function invocation](#2-through-function-invocation)
49-
- [Setting Options](#setting-options-function)
48+
- [Setting Options](#specifying-options)
5049
- [Animate Multiple Elements](#animate-multiple-elements)
5150
- [Transition Events](#transition-events)
52-
- [Asynchronous Support](#asynchronous-support-anim)
51+
- [Asynchronous Support](#asynchronous-support)
5352
- [Options](#options)
5453
- [Summary](#summary)
5554
- [Details](#details)
5655
- [Animations](#animations)
5756
- [Attention Seekers](#attention-seekers)
5857
- [Attention-Seeker Animations](#att-animations)
5958
- [How to use](#how-to-use)
60-
- [Setting Options](#setting-options-att)
59+
- [Connfiguring Options](#configuring-options)
6160
- [Attention Options](#attention-options)
6261
- [Stopping Attention Seekers](#stopping-attention-seekers)
6362
- [Custom Animation](#custom-animation)
6463
- [API](#api)
65-
- [Asynchronous Support](#asynchronous-support-custom)
64+
- [Asynchronous Support](#asynchronous-operation)
6665
- [Feedback](#feedback)
6766
- [License](#license)
6867

@@ -112,7 +111,7 @@ To animate elements on initial load, use the `appear` directive to trigger anima
112111
</template>
113112
```
114113

115-
<h4 id="setting-options-direct">Setting Options</h4>
114+
#### Setting Options
116115
Through 'direct invocation,' you can specify animation options by setting dataset attributes like so:
117116
```html
118117
<Transition @enter="flipInHorizontalLeft" @leave="zoomOutLeft" data-av-leave-ease="backIn" data-av-offset="100%">
@@ -154,7 +153,7 @@ const animateOut = (el, done) => {
154153
155154
<p align="right"><small><a href="#table-of-contents"><u>&uarr; Table of Contents</u></a></small></p>
156155

157-
<h4 id="setting-options-function">Setting Options</h4>
156+
#### Specifying Options
158157
When using function invocation, you can pass options as a configuration object to the third parameter of the animation:
159158
```javascript
160159
const animateIn = (el, done) => {
@@ -193,7 +192,7 @@ const animationEnded = (el) => {
193192
```
194193
<p align="right"><small><a href="#table-of-contents"><u>&uarr; Table of Contents</u></a></small></p>
195194
196-
### Asynchronous Support <a id="asynchronous-support-anim"></a>
195+
### Asynchronous Support
197196
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()`:
198197
```javascript
199198
const animateIn = async (el, done) => {
@@ -207,7 +206,7 @@ zoomIn(el, done).then(() => console.log('Success'))
207206
```
208207
<small>[See all animations](#animations)</small>
209208
<p align="right"><small><a href="#table-of-contents"><u>&uarr; Table of Contents</u></a></small></p>
210-
209+
<br>
211210
212211
213212
## Options
@@ -402,6 +401,7 @@ const animateIn = (el, done) => {
402401
403402
[View live demo of animations](https://animate4vue.netlify.app)
404403
<p align="right"><small><a href="#table-of-contents"><u>&uarr; Table of Contents</u></a></small></p>
404+
<br>
405405
406406
407407
## Attention Seekers
@@ -434,7 +434,7 @@ const ringBell = () => {
434434
435435
![demo1](https://github.com/artisticLogicMK/animate4vue/blob/master/md_assets/demo1.gif)
436436
437-
### <h4 id="setting-options-att">Setting Options</h4>
437+
### Configuring Options
438438
You can pass options to customize the animation behavior. For example:
439439
```javascript
440440
headShake(el, {
@@ -568,7 +568,7 @@ const animateIn = (el, done) => {
568568
569569
<p align="right"><small><a href="#table-of-contents"><u>&uarr; Table of Contents</u></a></small></p>
570570
571-
### Asynchronous Support <a id="asynchronous-support-custom"></a>
571+
### Asynchronous Operation
572572
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:
573573
```javascript
574574
const animateIn = async (el, done) => {
@@ -585,6 +585,7 @@ customAnimation(el, done, "leave", {
585585
.catch((error) => console.log('Animation Error:', error));
586586
```
587587
<p align="right"><small><a href="#table-of-contents"><u>&uarr; Table of Contents</u></a></small></p>
588+
<br>
588589
589590
590591
## Feedback

0 commit comments

Comments
 (0)