axi0motion

Curve marquee

The text runs without end along a curve, a gentle arc or a wave on a colored ribbon; drag it to fling it either way.

  • enhancer
  • loop
  • marquee
  • svg
  • drag
  • since 0.2

Background Studio: tune it below, then copy the code

Your system asks for reduced motion: the demo shows its final state and nothing moves.

Live demo

Curve marquee example

Be creative ✦ Small files ✦ Smooth motion

Controls

0.9 em
2
70 px/s

Code

It follows the controls above: change an option and the code changes with it.

<link rel="stylesheet" href="/axi0/motion/motion.css?v=6">
<script src="/axi0/motion/motion.js?v=10" defer></script>

<p class="demo-marquee" data-motion="curve-marquee">Be creative ✦ Small files ✦ Smooth motion</p>

The wrappers: CurveMarquee.tsx (React, TypeScript) and CurveMarquee.vue (Vue). Both render the same attributes as the HTML; the loader does the rest.

Options

AttributeDefaultWhat it does
data-motion-shapearcCurve
data-motion-depth0.9Depth of the curve
data-motion-waves2Crests of a wave
data-motion-speed70Speed
data-motion-directionleftDirection
data-motion-ribbonfalseColored ribbon under the text
data-motion-color#f6a04dRibbon color
data-motion-ink#111111Text color on the ribbon
data-motion-gap✦Mark between copies

Accessibility

The page's line keeps its place (invisible) and the curve is drawn over it, so nothing reflows; screen readers hear the text once and the drawing is aria-hidden. Dragging is a flourish, not needed to read anything. Reduced motion holds the text still (dragging still moves it). The loop stops off screen and in hidden tabs.

Size

curve-marquee.js is 1.8 KB gzip, with text-kit.js 2.6 KB it needs. A page loads the loader (2.7 KB) and core.js (1.4 KB) once, whatever it uses.