diff --git a/src/demo/Animations/AnimatedContentDemo.vue b/src/demo/Animations/AnimatedContentDemo.vue
index feb71ee..3a204fe 100644
--- a/src/demo/Animations/AnimatedContentDemo.vue
+++ b/src/demo/Animations/AnimatedContentDemo.vue
@@ -14,8 +14,12 @@
:animate-opacity="animateOpacity"
:scale="scale"
:threshold="threshold"
+ :disappear-after="disappearAfter"
+ :disappear-duration="disappearDuration"
+ :disappear-ease="disappearEase"
:key="key"
@complete="() => console.log('✅ Animation Complete!')"
+ @disappearance-complete="() => console.log('👋 Disappearance Complete!')"
>
Animated Content
@@ -44,6 +48,12 @@
+
+
+
+
+
+
@@ -89,6 +99,9 @@ const initialOpacity = ref(0);
const animateOpacity = ref(true);
const scale = ref(1);
const threshold = ref(0.1);
+const disappearAfter = ref(0);
+const disappearDuration = ref(0.5);
+const disappearEase = ref('power3.in');
const directionOptions = [
{ label: 'Vertical', value: 'vertical' },
@@ -101,6 +114,12 @@ const easeOptions = [
{ label: 'Elastic Out', value: 'elastic.out(1, 0.3)' }
];
+const disappearEaseOptions = [
+ { label: 'Power3 In', value: 'power3.in' },
+ { label: 'Power2 In', value: 'power2.in' },
+ { label: 'Bounce In', value: 'bounce.in' }
+];
+
const propData = [
{
name: 'distance',
@@ -167,6 +186,30 @@ const propData = [
type: 'string',
default: '""',
description: 'Additional CSS classes for styling.'
+ },
+ {
+ name: 'container',
+ type: 'string | HTMLElement | null',
+ default: 'null',
+ description: 'Custom scroll container element or selector.'
+ },
+ {
+ name: 'disappearAfter',
+ type: 'number',
+ default: '0',
+ description: 'Delay before disappear animation starts (in seconds). Set to 0 to disable.'
+ },
+ {
+ name: 'disappearDuration',
+ type: 'number',
+ default: '0.5',
+ description: 'Duration of the disappear animation in seconds.'
+ },
+ {
+ name: 'disappearEase',
+ type: 'string | function',
+ default: '"power3.in"',
+ description: 'GSAP easing function for the disappear animation.'
}
];
diff --git a/src/demo/Animations/FadeContentDemo.vue b/src/demo/Animations/FadeContentDemo.vue
index e1e53fb..794887f 100644
--- a/src/demo/Animations/FadeContentDemo.vue
+++ b/src/demo/Animations/FadeContentDemo.vue
@@ -11,8 +11,13 @@
:delay="delay"
:threshold="threshold"
:initial-opacity="initialOpacity"
- :easing="easing"
+ :ease="ease"
+ :disappear-after="disappearAfter"
+ :disappear-duration="disappearDuration"
+ :disappear-ease="disappearEase"
class="fade-content-demo-content"
+ @complete="() => console.log('✅ Fade Complete!')"
+ @disappearance-complete="() => console.log('👋 Disappearance Complete!')"
>
Fade Content
@@ -25,16 +30,26 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
@@ -52,11 +67,13 @@ import { ref, watch } from 'vue';
import TabbedLayout from '../../components/common/TabbedLayout.vue';
import RefreshButton from '../../components/common/RefreshButton.vue';
import PropTable from '../../components/common/PropTable.vue';
+import Dependencies from '../../components/code/Dependencies.vue';
import CliInstallation from '../../components/code/CliInstallation.vue';
import CodeExample from '../../components/code/CodeExample.vue';
import Customize from '../../components/common/Customize.vue';
import PreviewSwitch from '../../components/common/PreviewSwitch.vue';
import PreviewSlider from '../../components/common/PreviewSlider.vue';
+import PreviewSelect from '../../components/common/PreviewSelect.vue';
import FadeContent from '../../content/Animations/FadeContent/FadeContent.vue';
import { fadeContent } from '@/constants/code/Animations/fadeContentCode';
import { useForceRerender } from '@/composables/useForceRerender';
@@ -66,13 +83,28 @@ const duration = ref(1000);
const delay = ref(200);
const threshold = ref(0.1);
const initialOpacity = ref(0);
-const easing = ref('ease-out');
+const ease = ref('power2.out');
+const disappearAfter = ref(0);
+const disappearDuration = ref(500);
+const disappearEase = ref('power2.in');
const { rerenderKey, forceRerender } = useForceRerender();
+const easeOptions = [
+ { label: 'Power2 Out', value: 'power2.out' },
+ { label: 'Power3 Out', value: 'power3.out' },
+ { label: 'Ease Out', value: 'ease.out' }
+];
+
+const disappearEaseOptions = [
+ { label: 'Power2 In', value: 'power2.in' },
+ { label: 'Power3 In', value: 'power3.in' },
+ { label: 'Ease In', value: 'ease.in' }
+];
+
const propData = [
{ name: 'blur', type: 'boolean', default: 'false', description: 'Enable blur effect during fade animation.' },
{ name: 'duration', type: 'number', default: '1000', description: 'Animation duration in milliseconds.' },
- { name: 'easing', type: 'string', default: '"ease-out"', description: 'CSS easing function for the animation.' },
+ { name: 'ease', type: 'string | function', default: '"power2.out"', description: 'GSAP easing function for the animation.' },
{ name: 'delay', type: 'number', default: '0', description: 'Delay before animation starts in milliseconds.' },
{
name: 'threshold',
@@ -81,10 +113,36 @@ const propData = [
description: 'Intersection threshold to trigger animation (0-1).'
},
{ name: 'initialOpacity', type: 'number', default: '0', description: 'Initial opacity before animation (0-1).' },
- { name: 'className', type: 'string', default: '""', description: 'Additional CSS classes for styling.' }
+ { name: 'onComplete', type: 'function', default: 'undefined', description: 'Callback function called when fade animation completes.' },
+ { name: 'onDisappearanceComplete', type: 'function', default: 'undefined', description: 'Callback function called when disappear animation completes.' },
+ { name: 'className', type: 'string', default: '""', description: 'Additional CSS classes for styling.' },
+ {
+ name: 'container',
+ type: 'string | HTMLElement | null',
+ default: 'null',
+ description: 'Custom scroll container element or selector.'
+ },
+ {
+ name: 'disappearAfter',
+ type: 'number',
+ default: '0',
+ description: 'Delay before disappear animation starts (in milliseconds). Set to 0 to disable.'
+ },
+ {
+ name: 'disappearDuration',
+ type: 'number',
+ default: '500',
+ description: 'Duration of the disappear animation in milliseconds.'
+ },
+ {
+ name: 'disappearEase',
+ type: 'string | function',
+ default: '"power2.in"',
+ description: 'GSAP easing function for the disappear animation.'
+ }
];
-watch(blur, () => {
+watch([blur, ease, disappearEase], () => {
forceRerender();
});