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

@@ -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
};