Velocity Marquee

Oversized editorial rails that idle along, then answer your scroll: scroll faster and the rows speed up and lean into the motion; scroll back and they reverse. Solid and outline rows alternate.

Try it: Scroll the page quickly up and down — the rails speed up, lean and reverse.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/velocity-marquee.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/velocity-marquee. You can also copy the source into components/ui/velocity-marquee.tsx (view on GitHub).

Usage

import { VelocityMarquee } from '@/components/ui/velocity-marquee'

Props

Component props
PropTypeDefaultNotes
rowsstring[][]DEFAULT_ROWSOne array of phrases per row.
baseVelocitynumber3Idle drift in % of one copy per second (0.5–12).
boostnumber4How strongly scroll speed boosts the drift (0–10).
scrollContainerRefObject<HTMLElement>—Read velocity from this container instead of the window.
showControlsbooleantruePause / Play control.
classNamestring—Extra classes merged onto the root.

Dependencies

  • motion
  • lucide-react

See all 4 Vertical Scroll components