Speed Variation
Rows of words streaming the same way, each at its own pace and under its own label: 120 px per second on top, 20 below.
Updated
This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Gallery has 44 effects, including 6 free. Explore the category →
3 usage examples



How it works
Each .spmq-row carries its speed in its data-speed attribute, in pixels per second: 120 for the first, 20 for the second in the demo. A row without the attribute takes the value written on the root (60). The script works out one duration per row: the fast list, 532 px long, loops in 4.4 seconds; the slow one, 538 px, in 27 seconds.
Above each row, a .spmq-label paragraph names it: “FAST”, “SLOW”, or whatever the speed means in your case. It is ordinary, still text that you can enrich (a value, a unit, a checkbox) or remove.
All rows head left: the only thing that tells them apart at a glance is their pace. Their colours alternate between --spmq-color-1 (odd rows) and --spmq-color-2 (even rows). Add as many .spmq-row blocks as you need; data-direction="right" on one of them turns it round.
The block is controlled in one move: resting the mouse on the rows stops them all, and so does the round button.
Accessibility
- One button for the whole block:
aria-pressedturns totrueand every row freezes; it is reached with Tab and answers Space, Enter and a finger tap. - Labels are read: each
.spmq-labelis a paragraph placed before its list; a screen reader therefore announces it right before the row's items, read once (the copies carryaria-hidden="true"). - Speed cannot be heard: if the pace carries information (a bit rate, a level), also write it out in the label.
- Speed and reading: at 120 px/s a word crosses a 390 px phone screen in a little over 3 seconds. Keep that pace for short words or decoration, and put useful text on a slow row.
- Animations switched off by the user: the rows stay still under their labels, each scrollable by hand; the button disappears, since there is nothing left to stop.
Browser compatibility
One CSS animation per row, whose duration is written by the script, 5 KB, no dependency. The space between rows comes from flexbox gap (Chrome 84, Firefox 63, Safari 14.1); recounting on resize comes from ResizeObserver (Chrome 64, Firefox 69, Safari 13.1). Measured on 4 December 2026 in Chromium, Firefox and WebKit: 120 and 20 px/s found when measured (119 to 124 and 20 to 21 depending on the moment), full rows at 390 and 1,900 px, two independent blocks in one page.
If the script does not run, each row shows its list once, still, under its label. Before Safari 14.1 or Chrome 84 the rows touch each other (no gap): give them a margin.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0191-root" data-speed="60">
<div class="spmq-band">
<div class="spmq-rows">
<div class="spmq-row" data-speed="120">
<p class="spmq-label">FAST</p>
<div class="spmq-viewport">
<div class="spmq-track">
<ul class="spmq-group" role="list">
<li>…</li>
</ul>
</div>
</div>
</div>
<div class="spmq-row" data-speed="20">
<p class="spmq-label">SLOW</p>
<div class="spmq-viewport">
<div class="spmq-track">
<ul class="spmq-group" role="list">
<li>…</li>
</ul>
</div>
</div>
</div>
</div>
<button type="button" class="spmq-toggle" aria-pressed="false" aria-label="Pause"></button>
</div>
</div>
One-time payment, no subscription — the code is yours forever
Customize
Options passed to the API or data-* attributes:
| Option / property | Default | Effect |
|---|---|---|
data-speed on a .spmq-row |
120 / 20 | Pace of that row, in pixels per second. |
data-speed on the root |
60 | Pace of the rows that do not have their own. |
.spmq-label (HTML) |
FAST / SLOW | Label above a row; free text, or to be removed. |
--spmq-color-1 / --spmq-color-2 |
#f43f5e / #10b981 | Colour of odd and even rows; redefined on one row, it only applies to that row. |
--spmq-size / --spmq-space |
1.25rem / 4rem | Text size and white space between two words, for the whole block or row by row. |
data-direction on a .spmq-row |
absent (left) | right sends that row to the right. |
--spmq-height / --spmq-bg / --spmq-padding |
180px / #0a0a0f / 1rem 0 | Minimum height, background and inner padding of the block. |
--spmq-button / --spmq-button-size |
rgba(255, 255, 255, .8) / 2rem | Look of the shared Pause button. |
FAQ
data-speed and data-direction per row: you can turn one into the other by adjusting; pick the one that needs the least reworking..spmq-row block, change its data-speed and its list. The third row takes the colour of the first; to give it one of its own, redefine the variable on that row: .spmq-row:nth-child(3) { --spmq-color-1: #38bdf8; }. Size is set the same way with --spmq-size.pointer-events: none on .spmq-rows: hovering is no longer detected, the rows keep going under the mouse. The Pause button, placed outside that block, stays clickable; keep it, since it is what lets people stop the motion.