Added <RotatingText /> text animation

This commit is contained in:
Utkarsh-Singhal-26
2025-07-12 18:19:41 +05:30
parent 230f44f6e0
commit 90a41d1469
5 changed files with 429 additions and 2 deletions

View File

@@ -21,7 +21,8 @@ export const CATEGORIES = [
'Decrypted Text',
'True Focus',
'Scroll Float',
'Scroll Reveal'
'Scroll Reveal',
'Rotating Text'
]
},
{

View File

@@ -26,7 +26,8 @@ const textAnimations = {
'decrypted-text': () => import("../demo/TextAnimations/DecryptedTextDemo.vue"),
'true-focus': () => import("../demo/TextAnimations/TrueFocusDemo.vue"),
'scroll-float': () => import("../demo/TextAnimations/ScrollFloatDemo.vue"),
'scroll-reveal': ()=> import("../demo/TextAnimations/ScrollRevealDemo.vue")
'scroll-reveal': ()=> import("../demo/TextAnimations/ScrollRevealDemo.vue"),
'rotating-text': ()=> import("../demo/TextAnimations/RotatingTextDemo.vue")
};
const components = {

View File

@@ -0,0 +1,26 @@
import code from '@/content/TextAnimations/RotatingText/RotatingText.vue?raw';
import type { CodeObject } from '../../../types/code';
export const rotatingText: CodeObject = {
cli: `npx jsrepo add https://vue-bits.dev/ui/TextAnimations/RotatingText`,
installation: `npm i motion-v`,
usage: `<template>
<RotatingText
:texts="['Vue', 'Bits', 'is', 'Cool!']"
mainClassName="px-2 sm:px-2 md:px-3 bg-green-300 text-black overflow-hidden py-0.5 sm:py-1 md:py-2 justify-center rounded-lg"
:staggerFrom="last"
:initial="{ y: '100%' }"
:animate="{ y: 0 }"
:exit="{ y: '-120%' }"
:staggerDuration="0.025"
splitLevelClassName="overflow-hidden pb-0.5 sm:pb-1 md:pb-1"
:transition="{ type: "spring", damping: 30, stiffness: 400 }"
:rotationInterval="2000"
/>
</template>
<script setup lang="ts">
import RotatingText from "./RotatingText.vue";
</script>`,
code
};