Skip to content

Commit c5449b8

Browse files
authored
Merge pull request #5 from Redskullvue/attention-animations
Feat : Attention Animations Added To The Library
2 parents 3f78f77 + acf0ba1 commit c5449b8

File tree

13 files changed

+339
-11
lines changed

13 files changed

+339
-11
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,13 @@ const show = ref(true)
7474

7575
-Library is fully prop based so you can customize the animations based on your need
7676

77-
| Prop | Type | Default | Description |
78-
| ------------ | --------- | --------- | ------------------------------------------------------------------------------------- |
79-
| **appear** | `boolean` | `'false'` | If true animation will run on load |
80-
| **duration** | `number` | `500` | Duration of the animation in milliseconds. |
81-
| **delay** | `number` | `0` | Delay before the animation starts in milliseconds. |
82-
| **easing** | `string` | `'ease'` | CSS easing function to control the transition curve(CSS acceptable timing functions). |
77+
| Prop | Type | Default | Description |
78+
| ------------- | ----------------- | --------- | ---------------------------------------------------------------------------------------------- |
79+
| **appear** | `boolean` | `'false'` | If true animation will run on load |
80+
| **duration** | `number` | `500` | Duration of the animation in milliseconds. |
81+
| **delay** | `number` | `0` | Delay before the animation starts in milliseconds. |
82+
| **easing** | `string` | `'ease'` | CSS easing function to control the transition curve(CSS acceptable timing functions). |
83+
| **iteration** | `string , number` | `5` | Number of time an animation would run based on CSS iteration-count(Only Attention Animations). |
8384

8485
---
8586

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-transify",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"private": false,
55
"type": "module",
66
"main": "dist/vue-transify.umd.js",

playground/App.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
See Motions
1111
</button>
1212
</div>
13+
1314
<small class="main-container--version"
1415
>V-1.2.0 | Developed by
1516
<a href="https://github.com/Redskullvue">RedskullVue </a>
@@ -53,6 +54,12 @@ import ZoomDown from '@/components/ZoomDown.vue'
5354
import FlipX from '@/components/FlipX.vue'
5455
import FlipY from '@/components/FlipY.vue'
5556
import PageTransitionHelper from '@/components/PageTransitionHelper.vue'
57+
import Pulse from '@/components/Pulse.vue'
58+
import Flash from '@/components/Flash.vue'
59+
import ShakeX from '@/components/ShakeX.vue'
60+
import ShakeY from '@/components/ShakeY.vue'
61+
import Swing from '@/components/Swing.vue'
62+
import Tada from '@/components/Tada.vue'
5663
5764
const showSideBar = ref(true)
5865
const currentAnimation = shallowRef(Fade)
@@ -75,6 +82,12 @@ const animationMap = {
7582
ZoomDown,
7683
FlipX,
7784
FlipY,
85+
Pulse,
86+
Flash,
87+
ShakeX,
88+
ShakeY,
89+
Swing,
90+
Tada,
7891
}
7992
8093
const setAnimation = (name) => {

playground/components/sideBar.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ import { ref } from 'vue'
2929
const emits = defineEmits(['closeSideBar', 'selectAnimation'])
3030
3131
const animations = ref([
32+
{
33+
title: 'Attention Animations',
34+
children: ['Pulse', 'Flash', 'ShakeX', 'ShakeY', 'Swing', 'Tada'],
35+
},
3236
{
3337
title: 'Slides',
3438
children: ['SlideInUp', 'SlideInDown', 'SlideInLeft', 'SlideInRight'],

src/components/Flash.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<div
3+
class="vt-attention-flash"
4+
:style="{
5+
'--animation-duration': duration + 'ms',
6+
'--animation-delay': delay + 'ms',
7+
'--animation-easing': easing,
8+
'--animation-iteration-count': iteration,
9+
}"
10+
v-bind="$attrs"
11+
>
12+
<slot></slot>
13+
</div>
14+
</template>
15+
<script setup>
16+
import { commonProps } from './commonProps'
17+
18+
const props = defineProps({ ...commonProps })
19+
</script>

src/components/Pulse.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<div
3+
class="vt-attention-pulse"
4+
:style="{
5+
'--animation-duration': duration + 'ms',
6+
'--animation-delay': delay + 'ms',
7+
'--animation-easing': easing,
8+
'--animation-iteration-count': iteration,
9+
}"
10+
v-bind="$attrs"
11+
>
12+
<slot></slot>
13+
</div>
14+
</template>
15+
<script setup>
16+
import { commonProps } from './commonProps'
17+
18+
const props = defineProps({ ...commonProps })
19+
</script>

src/components/ShakeX.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<div
3+
class="vt-attention-shakex"
4+
:style="{
5+
'--animation-duration': duration + 'ms',
6+
'--animation-delay': delay + 'ms',
7+
'--animation-easing': easing,
8+
'--animation-iteration-count': iteration,
9+
}"
10+
v-bind="$attrs"
11+
>
12+
<slot></slot>
13+
</div>
14+
</template>
15+
<script setup>
16+
import { commonProps } from './commonProps'
17+
18+
const props = defineProps({ ...commonProps })
19+
</script>

src/components/ShakeY.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<div
3+
class="vt-attention-shakey"
4+
:style="{
5+
'--animation-duration': duration + 'ms',
6+
'--animation-delay': delay + 'ms',
7+
'--animation-easing': easing,
8+
'--animation-iteration-count': iteration,
9+
}"
10+
v-bind="$attrs"
11+
>
12+
<slot></slot>
13+
</div>
14+
</template>
15+
<script setup>
16+
import { commonProps } from './commonProps'
17+
18+
const props = defineProps({ ...commonProps })
19+
</script>

src/components/Swing.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<div
3+
class="vt-attention-swing"
4+
:style="{
5+
'--animation-duration': duration + 'ms',
6+
'--animation-delay': delay + 'ms',
7+
'--animation-easing': easing,
8+
'--animation-iteration-count': iteration,
9+
}"
10+
v-bind="$attrs"
11+
>
12+
<slot></slot>
13+
</div>
14+
</template>
15+
<script setup>
16+
import { commonProps } from './commonProps'
17+
18+
const props = defineProps({ ...commonProps })
19+
</script>

src/components/Tada.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<div
3+
class="vt-attention-tada"
4+
:style="{
5+
'--animation-duration': duration + 'ms',
6+
'--animation-delay': delay + 'ms',
7+
'--animation-easing': easing,
8+
'--animation-iteration-count': iteration,
9+
}"
10+
v-bind="$attrs"
11+
>
12+
<slot></slot>
13+
</div>
14+
</template>
15+
<script setup>
16+
import { commonProps } from './commonProps'
17+
18+
const props = defineProps({ ...commonProps })
19+
</script>

0 commit comments

Comments
 (0)