Lerp

Infinite marquee

Demo

A seamless ribbon of type moves at a constant speed with a visible pause control.

How it works

Background· 23 sites

Reference: ResizeObserver, MDN contributors

How it works

A seamless ribbon of type moves at a constant speed with a visible pause control.In 5 steps.

The seam disappears when the repeated unit and the distance are exactly the same. Measure a whole group, duplicate it enough to cover the viewport, and wrap the transform by that group width. Speed is constant; an easing curve would make a ticker surge at every join.

The controls below are authored demonstration values, not measurements of the linked sites. The stored fits currently describe scroll smoothing and intro curves, not this effect's geometry; see each site's spec sheet for those separately measured values and fit errors.

  1. 01

    Measure the repeating unit

    Include its trailing gap in the group width. Re-measure after fonts and container size change.

  2. 02

    Fill beyond both edges

    Duplicate the group until the visible width plus a full repeat are covered. Mark duplicates aria-hidden.

  3. 03

    Wrap distance, not elapsed time

    Advance a pixel phase with delta time and modulo the measured unit. Changing speed does not jump to a new position.

  4. 04

    Make stopping obvious

    A real Pause button stops the ribbon; keyboard focus and pointer hover also pause. Reduced motion presents one still row.

  5. 05

    Dispose cleanly

    Call destroy() on unmount to remove interaction and visibility listeners, disconnect observers and cancel the pending frame. Ignore font-ready work after disposal.

Code

The code

The engine is the file the demo above runs, framework-agnostic; the Svelte and React tabs wire it into a component.

Pro

Copy the engine, React or Svelte version.

Unlock code with Pro

US$60/year or US$8/month. Cancel anytime.

Prompt

Prompt pack

A seamless ribbon of type moves at a constant speed with a visible pause control.

1 prompts in Pro Generated 25 Sep 2026

  • Build it with a coding agentA framework-independent implementation brief with authored controls.

Pro opens every prompt, with the measured values filled in and ready to paste into your coding agent.

Unlock prompts with Pro

US$60/year or US$8/month. Cancel anytime.

Performance & accessibility

Performance

One transform per frame on the row. Clones are created only during resize and fonts settling; the row is bounded by viewport width. No per-letter animation, layout reads in the loop or continuously repainted gradients. The demo targets a frame budget suitable for phone displays; profile on the target device rather than treating an unloaded desktop frame counter as a guarantee. The host pauses the demo off screen. The standalone engine removes its observers and listeners on destroy.

Reduced motion

Reduced motion shows a stationary row with no duplicates. Live preference changes are respected. A labelled Pause button is always available; mouse hover and keyboard focus pause as well. Cloned groups are aria-hidden. Never put essential instructions only in a clipped ribbon.

Source

Source, credited

Original teaching implementation and CSS artwork, informed by the credited ResizeObserver documentation and the library's linked site observations. No source site's code or assets are reproduced. A site link describes the observed visual pattern, not proof that the site uses this engine or browser API.

Seen in the library

Sites using this effect.