Migrate ScrollVelocity component

This commit is contained in:
David Haz
2025-07-18 15:11:59 +03:00
parent 94c4cdd704
commit 20e76e75cf
6 changed files with 397 additions and 2 deletions

View File

@@ -25,7 +25,8 @@ export const CATEGORIES = [
'Scroll Float',
'Scroll Reveal',
'Rotating Text',
'Glitch Text'
'Glitch Text',
'Scroll Velocity'
]
},
{

View File

@@ -37,6 +37,7 @@ const textAnimations = {
'scroll-reveal': () => import("../demo/TextAnimations/ScrollRevealDemo.vue"),
'rotating-text': () => import("../demo/TextAnimations/RotatingTextDemo.vue"),
'glitch-text': () => import("../demo/TextAnimations/GlitchTextDemo.vue"),
'scroll-velocity': () => import("../demo/TextAnimations/ScrollVelocityDemo.vue"),
};
const components = {

View File

@@ -0,0 +1,24 @@
import code from '@content/TextAnimations/ScrollVelocity/ScrollVelocity.vue?raw';
import type { CodeObject } from '../../../types/code';
export const scrollVelocity: CodeObject = {
cli: `npx jsrepo add https://vue-bits.dev/ui/TextAnimations/ScrollVelocity`,
installation: `npm install gsap`,
usage: `<template>
<ScrollVelocity
:texts="['Vue Bits', 'Scroll Down']"
:velocity="100"
:damping="50"
:stiffness="400"
:velocity-mapping="{ input: [0, 1000], output: [0, 5] }"
class-name="custom-scroll-text"
parallax-class-name="custom-parallax"
scroller-class-name="custom-scroller"
/>
</template>
<script setup lang="ts">
import ScrollVelocity from "./ScrollVelocity.vue";
</script>`,
code
};