Charcoal UI

Velocity Marquee

Big text drifting sideways that speeds up with your scroll and flips direction when you scroll back.

  • Category: Interactive
  • Licence: Charcoal UI Pro
  • Built with: React 19, Tailwind CSS 4, Motion
  • Dependencies: motion, clsx, tailwind-merge

Examples

Velocity Marquee

API reference

PropTypeDefaultDescription
childrenstring—
speednumber4
containerRefObject<HTMLElement>—

About Velocity Marquee

Velocity Marquee drifts big text sideways and speeds it up with your scroll, flipping direction when you scroll back.

Velocity Marquee is an interactive effect for React 19, styled with Tailwind CSS 4 and animated with Motion. It drops into Next.js, Vite, Remix or Astro through the shadcn CLI as a single file you own.

When to use Velocity Marquee

  • Brand statements.
  • Section breaks.
  • Fashion and sports.
  • Event headlines.

How it works

Scroll velocity from Motion is smoothed and added to a base speed.

Pointer effects have a keyboard or static equivalent, and nothing that matters depends on hover alone. With prefers-reduced-motion on, it holds still or settles instantly instead of animating.

Customizing Velocity Marquee

Every prop is documented in the API reference above with its type and default. The ones you will reach for first are listed here.

The Customize panel next to the preview lets you change text, speed live, and the Code tab updates to match, so the snippet you copy already carries your values.

  • speed (number, default 4).
  • container (RefObject<HTMLElement>).

Goes well with Velocity Marquee

Velocity Marquee is already composed into a ready-made section, so you can see it in context or install the whole block.

  • CTA Marquee: CTA section
  • Hover Reveal List: A React hover reveal list: hovering a row floats its image beside the pointer
  • Pixel Grid: A React pixel grid: cells light up under the pointer and fade slowly
  • Draggable Cards: React draggable cards: polaroids scattered on a table you can pick up
  • Image Accordion: A React image accordion: the hovered panel expands to reveal its caption
  • Stack Cards: React stack cards: cards pin as you scroll and stack on each other

Install Velocity Marquee

npx shadcn@latest add @charcoal/velocity-marquee

Velocity Marquee is part of Charcoal UI Pro. One seat unlocks all 300 Pro components, 107 landing-page sections and 100 full templates, for every personal and client project, with updates included. Add the @charcoal registry once with your access token, then the command above copies velocity-marquee.tsx into components/ui and installs clsx, tailwind-merge.

You own the file you install: no runtime package, no lock-in, nothing to keep in sync. Change it however your product needs.

See Charcoal UI Pro pricing · Pro setup

Frequently asked questions

What happens when the page stops scrolling?
The marquee eases back to its base speed and keeps drifting. Scrolling down speeds it up, scrolling back flips its direction, and the scroll velocity is smoothed so it never jitters.
How do I install Velocity Marquee?
Velocity Marquee is part of Charcoal UI Pro. Add the @charcoal registry to components.json with your access token, then run npx shadcn@latest add @charcoal/velocity-marquee. It copies velocity-marquee.tsx into components/ui and installs motion, clsx, tailwind-merge.
Is Velocity Marquee free for commercial use?
Velocity Marquee needs a Charcoal UI Pro seat, monthly or a one-time lifetime price. A seat covers unlimited personal and commercial projects, including client work, and every future Pro component.
Does Velocity Marquee work with Next.js?
Yes. It is a client component for React 19 styled with Tailwind CSS 4, so it works in the Next.js App Router and Pages Router, Vite, Remix and Astro.
Can an AI coding agent install Velocity Marquee?
Yes. Connect the Charcoal UI MCP server (https://charcoalui.com/mcp) to Claude Code, Cursor or any MCP client; get_component returns Velocity Marquee's props and get_install_command returns the exact command.

Velocity Marquee as Markdown · llms.txt