Skip to content

Marquee

Any row or column of content in an endless loop: quotes, logos, tiles, tweets. Sideways or top to bottom, at a steady speed, with faded edges. It pauses under the pointer, when focus is inside, offscreen and in a hidden tab, and it has a visible Pause button.

On this page
Used for
  • Customer quotes
  • Logo strip
  • A row of templates
  • A wall of reviews
  • A changelog ticker

Examples

Speed
Gap
16px

Two rows, opposite ways

A vertical column

A three-column wall

Accessibility

  • The Pause button is a toggle button (aria-pressed) and is on by default; turn it off only if the loop is shorter than 5 seconds or you give another way to stop it.
  • The first group is the real content. The other groups are aria-hidden and inert, so a screen reader and Tab meet each item once.
  • Focus inside holds the loop, so a link you tabbed to does not slide away.
  • Reduced motion shows every item in a still, wrapping layout. Use label to name the region and list to expose the items as a list.

Installation

npx knowns-ui@latest add marquee
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

children
ReactNode
The items to loop. Each child is one item.
vertical
boolean
Defaultfalse
Top to bottom instead of sideways. Give it a height with className; it fills it.
reverse
boolean
Defaultfalse
The other way round.
speed
"slow" | "normal" | "fast"
Default"normal"
A steady 30, 50 or 80 px per second.
duration
number
Seconds for one loop. Wins over speed.
gap
number
Default32
Space between items in px.
pauseOnHover
boolean
Defaulttrue
Hold while the pointer is over it. Focus inside always holds.
fade
boolean
Defaulttrue
Soft faded edges.
paused
boolean
Hold the loop where it is (controlled).
still
boolean
Defaultfalse
Show the still wrapping layout instead of the loop. Reduced motion does this on its own.
controls
"start" | "end" | false
Default"end"
Where the Pause button sits above the loop, or false for none.
controlsLabel
string
Default"marquee"
What the button's screen-reader name says is paused: "Pause marquee".
list
boolean
Defaultfalse
Render the items as ul and li.
label
string
Names the region for a screen reader.
stillClassName
string
Extra classes for the still layout.
MarqueeToggle
{ playing, onToggle, label? }
The Pause / Play button, exported to place your own.

What it handles

  1. 01Loops any row or column of content with no seam: the track holds equal groups and moves by exactly one, so the end meets the start.
  2. 02Adds groups until the box is covered, whatever its width, and keeps the speed steady in pixels per second, so three items and thirty move at the same pace.
  3. 03Pauses under the pointer and whenever focus is inside; stops offscreen and in a hidden tab, so nothing runs where nobody looks.
  4. 04Shows a Pause button by default, because motion that runs longer than 5 seconds needs a way to stop it (WCAG 2.2.2). You can place it or leave it out.
  5. 05Hides the loop copies from screen readers and from Tab, so each item is read and reached once.
  6. 06Falls back to a still, wrapping layout under reduced motion, with every item visible.

States

First render
The loop is at its start and runs only while the box is on screen
none
Running
The track moves by one group per loop, in a straight line at a constant speed
linear, a loop is the group length at 30, 50 or 80 px/s
Hover or focus inside
The loop holds where it is and picks up from the same place
0ms
Paused by a person
The same hold, kept until Play
0ms
Offscreen or hidden tab
The loop holds; it resumes when the box is back in view
0ms
Reduced motion
A still layout that wraps, each item once, no Pause button
none

Works with

When to use

When to use

  • Social proof: customer quotes, logos or reviews that keep moving in a strip or a wall.
  • A ticker of tags, templates or release notes where the whole set matters more than any one item.

When not to use

  • Items people should step through one by one: use Carousel.
  • A handful of cards in a small space: use Fan Stack.
  • Important content a person has to read: moving text is hard to read: use Testimonials.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Marquee to my app and wire it to my own data.
  • I need social proof: customer quotes, logos or reviews that keep moving in a strip or a wall. Set that up with the Knowns UI Marquee.
  • Which Marquee props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "marquee" }) and search_docs({ query: "marquee" }).

Need help?

Stuck on Marquee, or found something off? We read every message.