[ REFACT ] : CountUp from Animations to TextAnimations

This commit is contained in:
Utkarsh-Singhal-26
2026-01-10 11:56:40 +05:30
parent b764ca4c5c
commit 1ccfe8f3c5
6 changed files with 24 additions and 12 deletions

View File

@@ -0,0 +1,31 @@
import code from '@/content/TextAnimations/CountUp/CountUp.vue?raw';
import { createCodeObject } from '@/types/code';
export const countup = createCodeObject(code, 'TextAnimations/CountUp', {
usage: `<template>
<CountUp
:from="0"
:to="100"
separator=","
direction="up"
:duration="1"
:delay="0"
:start-when="true"
class-name="count-up-text"
@start="handleStart"
@end="handleEnd"
/>
</template>
<script setup lang="ts">
import CountUp from "./CountUp.vue";
const handleStart = () => {
console.log("Count animation started!");
};
const handleEnd = () => {
console.log("Count animation ended!");
};
</script>`
});