Dillion Verma

Scroll Based Velocity

Text 311

About

Scrolling text whose speed changes based on scroll speed

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Scroll Based Velocity to your project and fits it to your theme.

Code

How Scroll Based Velocity is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";
import { VelocityScroll } from "@/components/ui/scroll-based-velocity";
import { cn } from "@/lib/utils";
import React from "react";

export function ScrollBasedVelocityDemo() {
  return (
    <div className="min-h-[200vh] w-full relative">
      <div className="fixed inset-0 flex items-center justify-center pointer-events-none">
        <div className="w-full max-w-5xl mx-auto p-4">
          <div
            className={cn(
              "rounded-xl w-full h-[500px]",
              "border border-neutral-200 dark:border-neutral-800",
              "bg-neutral-100/50 dark:bg-neutral-900/50 backdrop-blur-sm",
              "flex items-center justify-center"
            )}
          >
            <VelocityScroll
              text="Velocity Scroll"
              default_velocity={5}
              className="font-display text-center text-4xl font-bold tracking-[-0.02em] text-black drop-shadow-sm dark:text-white md:text-7xl md:leading-[5rem] pointer-events-auto"
            />
          </div>
        </div>
      </div>

      <div className="h-[200vh]" aria-hidden="true" />
    </div>
  );
}

Dependencies

More by Dillion Verma

View all
  • Interactive Hover Button

    Interactive Hover Button

    3.7K
  • Rainbow Button

    Rainbow Button

    2.5K
  • Globe

    Globe

    2.3K
  • Animated Beam

    Animated Beam

    2.1K
  • Text Reveal

    Text Reveal

    1.7K
  • Confetti

    Confetti

    1.2K
  • Sparkles Text

    Sparkles Text

    1.2K
  • Interactive Icon Cloud

    Interactive Icon Cloud

    1.1K

More in Text

View all
  • Motion Blur Text

    Motion Blur Text

    45
  • Rainbow Text Effect

    Rainbow Text Effect

    58
  • Short Slide Down

    Short Slide Down

    45
  • Blur Reveal

    Blur Reveal

    72
  • Text Reveal

    Text Reveal

    29
  • Apple Hello Effect

    Apple Hello Effect

    659
  • Text Highlight

    Text Highlight

    96
  • Scroll Fill Headline

    Scroll Fill Headline

    13