Cnippet

Scroll Velocity Text

Text 62

About

A continuous text marquee whose speed reacts to scroll velocity — the faster you scroll, the faster the marquee moves.

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

Code

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

Usage.tsx

import { ScrollVelocityRow } from "@/components/ui/scroll-velocity-text";

const words = [
  "React",
  "TypeScript",
  "Tailwind CSS",
  "Motion",
  "Next.js",
  "shadcn/ui",
  "Vite",
  "Radix UI",
];

export default function ScrollVelocityBasic() {
  return (
    <div className="flex min-h-50 items-center justify-center overflow-hidden">
      <ScrollVelocityRow baseVelocity={3}>
        {words.map((word) => (
          <span
            className="mx-6 font-medium text-base text-muted-foreground"
            key={word}
          >
            {word}
            <span className="mx-6 text-muted-foreground/30">•</span>
          </span>
        ))}
      </ScrollVelocityRow>
    </div>
  );
}

Dependencies