@maz-ui/mcp 4.0.0-beta.26
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 +21 -0
- package/README.md +264 -0
- package/bin/maz-ui-mcp.mjs +7 -0
- package/dist/mcp.d.mts +13 -0
- package/dist/mcp.d.ts +13 -0
- package/dist/mcp.mjs +586 -0
- package/docs/generated-docs/maz-accordion.doc.md +21 -0
- package/docs/generated-docs/maz-animated-counter.doc.md +17 -0
- package/docs/generated-docs/maz-animated-element.doc.md +14 -0
- package/docs/generated-docs/maz-animated-text.doc.md +14 -0
- package/docs/generated-docs/maz-avatar.doc.md +44 -0
- package/docs/generated-docs/maz-backdrop.doc.md +61 -0
- package/docs/generated-docs/maz-badge.doc.md +16 -0
- package/docs/generated-docs/maz-bottom-sheet.doc.md +21 -0
- package/docs/generated-docs/maz-btn.doc.md +30 -0
- package/docs/generated-docs/maz-card-spotlight.doc.md +16 -0
- package/docs/generated-docs/maz-card.doc.md +39 -0
- package/docs/generated-docs/maz-carousel.doc.md +16 -0
- package/docs/generated-docs/maz-chart.doc.md +10 -0
- package/docs/generated-docs/maz-checkbox.doc.md +34 -0
- package/docs/generated-docs/maz-checklist.doc.md +30 -0
- package/docs/generated-docs/maz-circular-progress-bar.doc.md +27 -0
- package/docs/generated-docs/maz-date-picker.doc.md +52 -0
- package/docs/generated-docs/maz-dialog-confirm.doc.md +24 -0
- package/docs/generated-docs/maz-dialog.doc.md +22 -0
- package/docs/generated-docs/maz-drawer.doc.md +26 -0
- package/docs/generated-docs/maz-dropdown.doc.md +42 -0
- package/docs/generated-docs/maz-dropzone.doc.md +82 -0
- package/docs/generated-docs/maz-expand-animation.doc.md +12 -0
- package/docs/generated-docs/maz-fullscreen-loader.doc.md +13 -0
- package/docs/generated-docs/maz-gallery.doc.md +17 -0
- package/docs/generated-docs/maz-icon.doc.md +18 -0
- package/docs/generated-docs/maz-input-code.doc.md +25 -0
- package/docs/generated-docs/maz-input-number.doc.md +31 -0
- package/docs/generated-docs/maz-input-phone-number.doc.md +56 -0
- package/docs/generated-docs/maz-input-price.doc.md +26 -0
- package/docs/generated-docs/maz-input-tags.doc.md +24 -0
- package/docs/generated-docs/maz-input.doc.md +54 -0
- package/docs/generated-docs/maz-lazy-img.doc.md +31 -0
- package/docs/generated-docs/maz-link.doc.md +31 -0
- package/docs/generated-docs/maz-loading-bar.doc.md +6 -0
- package/docs/generated-docs/maz-pagination.doc.md +22 -0
- package/docs/generated-docs/maz-popover.doc.md +70 -0
- package/docs/generated-docs/maz-pull-to-refresh.doc.md +31 -0
- package/docs/generated-docs/maz-radio-buttons.doc.md +33 -0
- package/docs/generated-docs/maz-radio.doc.md +33 -0
- package/docs/generated-docs/maz-reading-progress-bar.doc.md +18 -0
- package/docs/generated-docs/maz-select-country.doc.md +44 -0
- package/docs/generated-docs/maz-select.doc.md +65 -0
- package/docs/generated-docs/maz-slider.doc.md +20 -0
- package/docs/generated-docs/maz-spinner.doc.md +6 -0
- package/docs/generated-docs/maz-stepper.doc.md +29 -0
- package/docs/generated-docs/maz-switch.doc.md +31 -0
- package/docs/generated-docs/maz-table-cell.doc.md +5 -0
- package/docs/generated-docs/maz-table-row.doc.md +11 -0
- package/docs/generated-docs/maz-table-title.doc.md +5 -0
- package/docs/generated-docs/maz-table.doc.md +66 -0
- package/docs/generated-docs/maz-tabs-bar.doc.md +18 -0
- package/docs/generated-docs/maz-tabs-content-item.doc.md +11 -0
- package/docs/generated-docs/maz-tabs-content.doc.md +5 -0
- package/docs/generated-docs/maz-tabs.doc.md +17 -0
- package/docs/generated-docs/maz-textarea.doc.md +41 -0
- package/docs/src/components/index.md +8 -0
- package/docs/src/components/maz-accordion.md +80 -0
- package/docs/src/components/maz-animated-counter.md +124 -0
- package/docs/src/components/maz-animated-element.md +36 -0
- package/docs/src/components/maz-animated-text.md +36 -0
- package/docs/src/components/maz-avatar.md +179 -0
- package/docs/src/components/maz-backdrop.md +16 -0
- package/docs/src/components/maz-badge.md +222 -0
- package/docs/src/components/maz-bottom-sheet.md +398 -0
- package/docs/src/components/maz-btn.md +526 -0
- package/docs/src/components/maz-card-spotlight.md +163 -0
- package/docs/src/components/maz-card.md +447 -0
- package/docs/src/components/maz-carousel.md +127 -0
- package/docs/src/components/maz-chart.md +346 -0
- package/docs/src/components/maz-checkbox.md +168 -0
- package/docs/src/components/maz-checklist.md +414 -0
- package/docs/src/components/maz-circular-progress-bar.md +147 -0
- package/docs/src/components/maz-date-picker.md +1078 -0
- package/docs/src/components/maz-dialog-confirm.md +240 -0
- package/docs/src/components/maz-dialog.md +208 -0
- package/docs/src/components/maz-drawer.md +177 -0
- package/docs/src/components/maz-dropdown.md +650 -0
- package/docs/src/components/maz-dropzone.md +442 -0
- package/docs/src/components/maz-expand-animation.md +99 -0
- package/docs/src/components/maz-fullscreen-loader.md +58 -0
- package/docs/src/components/maz-gallery.md +85 -0
- package/docs/src/components/maz-icon.md +85 -0
- package/docs/src/components/maz-input-code.md +61 -0
- package/docs/src/components/maz-input-number.md +81 -0
- package/docs/src/components/maz-input-phone-number.md +867 -0
- package/docs/src/components/maz-input-price.md +58 -0
- package/docs/src/components/maz-input-tags.md +114 -0
- package/docs/src/components/maz-input.md +453 -0
- package/docs/src/components/maz-lazy-img.md +24 -0
- package/docs/src/components/maz-link.md +156 -0
- package/docs/src/components/maz-loading-bar.md +26 -0
- package/docs/src/components/maz-pagination.md +81 -0
- package/docs/src/components/maz-popover.md +1414 -0
- package/docs/src/components/maz-pull-to-refresh.md +49 -0
- package/docs/src/components/maz-radio-buttons.md +456 -0
- package/docs/src/components/maz-radio.md +141 -0
- package/docs/src/components/maz-reading-progress-bar.md +74 -0
- package/docs/src/components/maz-select-country.md +636 -0
- package/docs/src/components/maz-select.md +439 -0
- package/docs/src/components/maz-slider.md +191 -0
- package/docs/src/components/maz-spinner.md +93 -0
- package/docs/src/components/maz-stepper.md +418 -0
- package/docs/src/components/maz-switch.md +92 -0
- package/docs/src/components/maz-table.md +571 -0
- package/docs/src/components/maz-tabs.md +231 -0
- package/docs/src/components/maz-textarea.md +218 -0
- package/docs/src/composables/use-aos.md +34 -0
- package/docs/src/composables/use-breakpoints.md +35 -0
- package/docs/src/composables/use-dialog.md +88 -0
- package/docs/src/composables/use-display-names.md +174 -0
- package/docs/src/composables/use-form-validator.md +1149 -0
- package/docs/src/composables/use-idle-timeout.md +256 -0
- package/docs/src/composables/use-reading-time.md +168 -0
- package/docs/src/composables/use-string-matching.md +63 -0
- package/docs/src/composables/use-swipe.md +223 -0
- package/docs/src/composables/use-timer.md +130 -0
- package/docs/src/composables/use-toast.md +71 -0
- package/docs/src/composables/use-user-visibility.md +169 -0
- package/docs/src/composables/use-wait.md +62 -0
- package/docs/src/composables/use-window-size.md +18 -0
- package/docs/src/demo/DemoAuthPage.vue +178 -0
- package/docs/src/demo/DemoDashboardPage.vue +298 -0
- package/docs/src/demo/DemoProductPage.vue +135 -0
- package/docs/src/directives/click-outside.md +275 -0
- package/docs/src/directives/fullscreen-img.md +101 -0
- package/docs/src/directives/lazy-img.md +184 -0
- package/docs/src/directives/tooltip.md +458 -0
- package/docs/src/directives/zoom-img.md +127 -0
- package/docs/src/guide/cli.md +144 -0
- package/docs/src/guide/getting-started.md +284 -0
- package/docs/src/guide/icon-set.md +60 -0
- package/docs/src/guide/icons.md +481 -0
- package/docs/src/guide/mcp.md +210 -0
- package/docs/src/guide/migration-v4.md +898 -0
- package/docs/src/guide/nuxt.md +411 -0
- package/docs/src/guide/resolvers.md +697 -0
- package/docs/src/guide/themes.md +789 -0
- package/docs/src/guide/translations.md +1173 -0
- package/docs/src/guide/vue.md +243 -0
- package/docs/src/helpers/camel-case.md +14 -0
- package/docs/src/helpers/capitalize.md +51 -0
- package/docs/src/helpers/check-availability.md +14 -0
- package/docs/src/helpers/country-code-to-unicode-flag.md +213 -0
- package/docs/src/helpers/currency.md +67 -0
- package/docs/src/helpers/date.md +67 -0
- package/docs/src/helpers/debounce-callback.md +14 -0
- package/docs/src/helpers/debounce-id.md +14 -0
- package/docs/src/helpers/debounce.md +14 -0
- package/docs/src/helpers/get-country-flag-url.md +156 -0
- package/docs/src/helpers/is-client.md +14 -0
- package/docs/src/helpers/is-equal.md +14 -0
- package/docs/src/helpers/is-standalone-mode.md +14 -0
- package/docs/src/helpers/kebab-case.md +14 -0
- package/docs/src/helpers/normalize-string.md +14 -0
- package/docs/src/helpers/number.md +65 -0
- package/docs/src/helpers/pascal-case.md +14 -0
- package/docs/src/helpers/script-loader.md +14 -0
- package/docs/src/helpers/sleep.md +14 -0
- package/docs/src/helpers/snake-case.md +14 -0
- package/docs/src/helpers/throttle-id.md +14 -0
- package/docs/src/helpers/throttle.md +14 -0
- package/docs/src/index.md +555 -0
- package/docs/src/made-with-maz-ui.md +58 -0
- package/docs/src/plugins/aos.md +347 -0
- package/docs/src/plugins/dialog.md +411 -0
- package/docs/src/plugins/toast.md +349 -0
- package/docs/src/plugins/wait.md +109 -0
- package/package.json +84 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: aos (animation on scroll)
|
|
3
|
+
description: Plugin to animate elements on your page as you scroll.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{ $frontmatter.title }}
|
|
7
|
+
|
|
8
|
+
{{ $frontmatter.description }}
|
|
9
|
+
|
|
10
|
+
::: tip
|
|
11
|
+
This plugin has a composable for easier use, after installing it, you can use [useAos](./../composables/use-aos.md)
|
|
12
|
+
:::
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
All options are listed in the [Global Options](#global-options) section.
|
|
17
|
+
|
|
18
|
+
::: code-group
|
|
19
|
+
|
|
20
|
+
```ts [Vue]
|
|
21
|
+
import { createApp } from 'vue'
|
|
22
|
+
import router from './router'
|
|
23
|
+
import { AosPlugin, AosOptions } from 'maz-ui/plugins/aos'
|
|
24
|
+
|
|
25
|
+
// ⚠️ import necessary CSS file ⚠️
|
|
26
|
+
import 'maz-ui/aos-styles'
|
|
27
|
+
|
|
28
|
+
const app = createApp(App)
|
|
29
|
+
|
|
30
|
+
app.use(router)
|
|
31
|
+
|
|
32
|
+
const aosOptions: AosOptions = {
|
|
33
|
+
animation: {
|
|
34
|
+
duration: 1000,
|
|
35
|
+
once: false,
|
|
36
|
+
delay: 0,
|
|
37
|
+
},
|
|
38
|
+
delay: 100,
|
|
39
|
+
router,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
app.use(AosPlugin, aosOptions)
|
|
43
|
+
|
|
44
|
+
app.mount('#app')
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```ts [Nuxt]
|
|
48
|
+
export default defineNuxtConfig({
|
|
49
|
+
modules: ['@maz-ui/nuxt'],
|
|
50
|
+
mazUi: {
|
|
51
|
+
composables: {
|
|
52
|
+
useAos: {
|
|
53
|
+
animation: {
|
|
54
|
+
duration: 1000,
|
|
55
|
+
once: false,
|
|
56
|
+
delay: 0,
|
|
57
|
+
},
|
|
58
|
+
delay: 100,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
})
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
:::
|
|
66
|
+
|
|
67
|
+
## Basic usage
|
|
68
|
+
|
|
69
|
+
<MazCard overflow-hidden data-maz-aos="scale-out" id="parentCard">
|
|
70
|
+
<div class="maz-flex" style="display: flex; align-items: start; gap: 1rem; margin-bottom: 1rem;">
|
|
71
|
+
<MazAvatar
|
|
72
|
+
data-maz-aos-delay="300"
|
|
73
|
+
data-maz-aos="scale-in"
|
|
74
|
+
size="2rem"
|
|
75
|
+
src="https://api.dicebear.com/7.x/big-smile/svg?backgroundColor=1d90ff&scale=80&seed=maz-ui"
|
|
76
|
+
/>
|
|
77
|
+
<div>
|
|
78
|
+
<h1
|
|
79
|
+
data-maz-aos="fade-down"
|
|
80
|
+
data-maz-aos-delay="600"
|
|
81
|
+
data-maz-aos-anchor="#parentCard"
|
|
82
|
+
style="margin: 0;"
|
|
83
|
+
>
|
|
84
|
+
Maz-UI
|
|
85
|
+
</h1>
|
|
86
|
+
<p
|
|
87
|
+
data-maz-aos="zoom-in-left"
|
|
88
|
+
data-maz-aos-delay="900"
|
|
89
|
+
style="margin: 0"
|
|
90
|
+
class="maz-text-muted"
|
|
91
|
+
>
|
|
92
|
+
Library
|
|
93
|
+
</p>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<p
|
|
97
|
+
data-maz-aos="flip-up"
|
|
98
|
+
data-maz-aos-delay="1200"
|
|
99
|
+
data-maz-aos-duration="1000"
|
|
100
|
+
style="margin: 0"
|
|
101
|
+
>
|
|
102
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
103
|
+
</p>
|
|
104
|
+
</MazCard>
|
|
105
|
+
|
|
106
|
+
```html{1,13}
|
|
107
|
+
<MazCard overflow-hidden data-maz-aos="scale-out" id="parentCard">
|
|
108
|
+
<div class="maz-flex" style="display: flex; align-items: start; gap: 1rem; margin-bottom: 1rem;">
|
|
109
|
+
<MazAvatar
|
|
110
|
+
data-maz-aos-delay="300"
|
|
111
|
+
data-maz-aos="scale-in"
|
|
112
|
+
size="2rem"
|
|
113
|
+
src="https://api.dicebear.com/7.x/big-smile/svg?backgroundColor=1d90ff&scale=80&seed=maz-ui"
|
|
114
|
+
/>
|
|
115
|
+
<div>
|
|
116
|
+
<h1
|
|
117
|
+
data-maz-aos="fade-down"
|
|
118
|
+
data-maz-aos-delay="600"
|
|
119
|
+
data-maz-aos-anchor="#parentCard"
|
|
120
|
+
style="margin: 0;"
|
|
121
|
+
>
|
|
122
|
+
Maz-UI
|
|
123
|
+
</h1>
|
|
124
|
+
<p
|
|
125
|
+
data-maz-aos="zoom-in-left"
|
|
126
|
+
data-maz-aos-delay="900"
|
|
127
|
+
style="margin: 0"
|
|
128
|
+
class="maz-text-muted"
|
|
129
|
+
>
|
|
130
|
+
Library
|
|
131
|
+
</p>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
<p
|
|
135
|
+
data-maz-aos="flip-up"
|
|
136
|
+
data-maz-aos-delay="1200"
|
|
137
|
+
data-maz-aos-duration="1000"
|
|
138
|
+
style="margin: 0"
|
|
139
|
+
>
|
|
140
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
141
|
+
</p>
|
|
142
|
+
</MazCard>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Atributes
|
|
146
|
+
|
|
147
|
+
| Attribute | Description | Example value | Default value |
|
|
148
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | ------------- |
|
|
149
|
+
| data-maz-aos | animation name | fade-up | - |
|
|
150
|
+
| data-maz-aos-duration | \*Duration of animation (ms) | 50 to 3000 (with step of 50) | 300 |
|
|
151
|
+
| data-maz-aos-easing | Choose timing function to ease elements in different ways | ease-in-sine | linear |
|
|
152
|
+
| data-maz-aos-delay | Delay animation (ms) | 50 to 3000 (with step of 50) | 0 |
|
|
153
|
+
| data-maz-aos-anchor | Anchor element, whose offset will be counted to trigger animation instead of actual elements offset. ONLY with ID attribute | #selector | undefined |
|
|
154
|
+
| data-maz-aos-once | Choose wheter animation should fire once, or every time you scroll up/down to element | true | false |
|
|
155
|
+
|
|
156
|
+
## Animations
|
|
157
|
+
|
|
158
|
+
### Fade
|
|
159
|
+
|
|
160
|
+
- fade-up
|
|
161
|
+
- fade-down
|
|
162
|
+
- fade-right
|
|
163
|
+
- fade-left
|
|
164
|
+
- fade-up-right
|
|
165
|
+
- fade-up-left
|
|
166
|
+
- fade-down-right
|
|
167
|
+
- fade-down-left
|
|
168
|
+
|
|
169
|
+
### Zoom
|
|
170
|
+
|
|
171
|
+
- zoom-in
|
|
172
|
+
- zoom-in-up
|
|
173
|
+
- zoom-in-down
|
|
174
|
+
- zoom-in-right
|
|
175
|
+
- zoom-in-left
|
|
176
|
+
- zoom-out
|
|
177
|
+
- zoom-out-up
|
|
178
|
+
- zoom-out-down
|
|
179
|
+
- zoom-out-right
|
|
180
|
+
- zoom-out-left
|
|
181
|
+
|
|
182
|
+
### Slide
|
|
183
|
+
|
|
184
|
+
- slide-up
|
|
185
|
+
- slide-down
|
|
186
|
+
- slide-right
|
|
187
|
+
- slide-left
|
|
188
|
+
|
|
189
|
+
### Flip
|
|
190
|
+
|
|
191
|
+
- flip-left
|
|
192
|
+
- flip-right
|
|
193
|
+
- flip-up
|
|
194
|
+
- flip-down
|
|
195
|
+
|
|
196
|
+
### Rotate
|
|
197
|
+
|
|
198
|
+
- rotate-left
|
|
199
|
+
- rotate-right
|
|
200
|
+
|
|
201
|
+
### Scale
|
|
202
|
+
|
|
203
|
+
- scale-in
|
|
204
|
+
- scale-out
|
|
205
|
+
|
|
206
|
+
## Easing
|
|
207
|
+
|
|
208
|
+
You can choose one of these timing function to animate elements nicely:
|
|
209
|
+
|
|
210
|
+
- linear
|
|
211
|
+
- ease
|
|
212
|
+
- ease-in
|
|
213
|
+
- ease-out
|
|
214
|
+
- ease-in-out
|
|
215
|
+
- ease-in-back
|
|
216
|
+
- ease-out-back
|
|
217
|
+
- ease-in-out-back
|
|
218
|
+
- ease-in-sine
|
|
219
|
+
- ease-out-sine
|
|
220
|
+
- ease-in-out-sine
|
|
221
|
+
- ease-in-quad
|
|
222
|
+
- ease-out-quad
|
|
223
|
+
- ease-in-out-quad
|
|
224
|
+
- ease-in-cubic
|
|
225
|
+
- ease-out-cubic
|
|
226
|
+
- ease-in-out-cubic
|
|
227
|
+
- ease-in-quart
|
|
228
|
+
- ease-out-quart
|
|
229
|
+
- ease-in-out-quart
|
|
230
|
+
|
|
231
|
+
## Nuxt
|
|
232
|
+
|
|
233
|
+
::: tip
|
|
234
|
+
For **NuxtJS v3** and higher, use the dedicated Nuxt module to take advantage of auto-imports of components, plugins, composables and css files: [Nuxt Module Documentation](./nuxt.md)
|
|
235
|
+
:::
|
|
236
|
+
|
|
237
|
+
Should be executed on client side
|
|
238
|
+
|
|
239
|
+
`nuxt.config.(ts|js)`
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
export default defineNuxtConfig({
|
|
243
|
+
css: ['maz-ui/aos-styles'],
|
|
244
|
+
})
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
`plugins/maz-aos.client.ts`
|
|
248
|
+
|
|
249
|
+
```ts
|
|
250
|
+
import { AosOptions, installAos } from 'maz-ui/plugins'
|
|
251
|
+
|
|
252
|
+
export default ({ vueApp, $router: router }) => {
|
|
253
|
+
const options: AosOptions = {
|
|
254
|
+
router,
|
|
255
|
+
animation: {
|
|
256
|
+
duration: 1000,
|
|
257
|
+
delay: 0,
|
|
258
|
+
once: false,
|
|
259
|
+
},
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
vueApp.use(installAos, options)
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## Run animations programatically
|
|
267
|
+
|
|
268
|
+
You can run animations programatically with the useAos composable.
|
|
269
|
+
This is useful if you want to run animations after the page is loaded or if no router is provided.
|
|
270
|
+
|
|
271
|
+
```vue
|
|
272
|
+
<script lang="ts" setup>
|
|
273
|
+
import { useAos } from 'maz-ui/composables'
|
|
274
|
+
import { onMounted } from 'vue'
|
|
275
|
+
|
|
276
|
+
const aos = useAos()
|
|
277
|
+
|
|
278
|
+
onMounted(() => {
|
|
279
|
+
// should be run on client side
|
|
280
|
+
aos.runAnimations()
|
|
281
|
+
})
|
|
282
|
+
</script>
|
|
283
|
+
|
|
284
|
+
<template>
|
|
285
|
+
<div id="parentCard" data-maz-aos="scale-out">
|
|
286
|
+
<p
|
|
287
|
+
data-maz-aos-delay="300"
|
|
288
|
+
data-maz-aos="scale-in"
|
|
289
|
+
size="2rem"
|
|
290
|
+
src="https://api.dicebear.com/7.x/big-smile/svg?backgroundColor=1d90ff&scale=80&seed=maz-ui"
|
|
291
|
+
>
|
|
292
|
+
In the heart of Hollywood's narrow alleyways, there existed an actor like no other—a charismatic feline named Whiskers. With his sleek black fur and piercing eyes, he stole the spotlight in every appearance. Whiskers, known for his versatility and natural talent, seamlessly slipped into dramatic, comedic, or action-packed roles.
|
|
293
|
+
</p>
|
|
294
|
+
</div>
|
|
295
|
+
</template>
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Global Options
|
|
299
|
+
|
|
300
|
+
```ts
|
|
301
|
+
export interface AosOptions {
|
|
302
|
+
/**
|
|
303
|
+
* provide your router to launch animation after each navigation
|
|
304
|
+
* @default undefined
|
|
305
|
+
*/
|
|
306
|
+
router?: Router
|
|
307
|
+
/**
|
|
308
|
+
* duration in ms before start animations (useful when the HTML rendering is slow)
|
|
309
|
+
* @default 100
|
|
310
|
+
*/
|
|
311
|
+
delay?: number
|
|
312
|
+
observer?: {
|
|
313
|
+
/**
|
|
314
|
+
* Scope animation to specific parent HTMLElement
|
|
315
|
+
* @default undefined
|
|
316
|
+
*/
|
|
317
|
+
root?: Element | Document | null
|
|
318
|
+
/**
|
|
319
|
+
* margin around elements to trigger the animations - Ex: "100px"
|
|
320
|
+
* @default undefined
|
|
321
|
+
*/
|
|
322
|
+
rootMargin?: string
|
|
323
|
+
/**
|
|
324
|
+
* Ratio concerponding to the element size
|
|
325
|
+
* @default 0.2
|
|
326
|
+
*/
|
|
327
|
+
threshold?: number | number[]
|
|
328
|
+
}
|
|
329
|
+
animation?: {
|
|
330
|
+
/**
|
|
331
|
+
* if `false` the animation is played each times when the element is visible
|
|
332
|
+
* @default true
|
|
333
|
+
*/
|
|
334
|
+
once?: boolean
|
|
335
|
+
/**
|
|
336
|
+
* Default animation duration in ms
|
|
337
|
+
* @default 300
|
|
338
|
+
*/
|
|
339
|
+
duration?: number
|
|
340
|
+
/**
|
|
341
|
+
* Default animation delay in ms
|
|
342
|
+
* @default 0
|
|
343
|
+
*/
|
|
344
|
+
delay?: number
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
```
|