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
- Customer quotes
- Logo strip
- A row of templates
- A wall of reviews
- A changelog ticker
Examples
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
labelto name the region andlistto expose the items as a list.
Installation
npx knowns-ui@latest add marqueePaste this into your coding agent (Claude Code, Cursor, Codex). It checks your project, sets up the registry, runs the install and verifies it.
Install Marquee from Knowns UI into this project. Work step by step, show me each change, and ask before you edit files outside this project.
Context: Knowns UI (https://ui.knowns.dev) is a shadcn registry. Items land in the project as source files. Docs: https://ui.knowns.dev/docs/marquee
1. Check the project first. Stop and tell me if any of these is missing:
- React 19 and Tailwind CSS v4.
- A components.json at the project root. If there is none, ask me before running `npx knowns-ui@latest init --no-key` (it runs shadcn init when needed, then adds the registries).
2. Run:
```bash
npx knowns-ui@latest add marquee
```
It writes these files:
- lib/knowns/run.ts
- lib/knowns/json.tsx
- lib/knowns/status.ts
- lib/knowns/tone.ts
- lib/knowns/types.ts
- lib/knowns/use-abortable.ts
- lib/knowns/utils.ts
- components/ui/knowns/illustrations/illust-utils.ts
- components/ui/knowns/illustrations/use-in-view.ts
- components/ui/knowns/marquee/marquee.tsx
- components/ui/knowns/marquee/marquee-utils.ts
and installs these npm packages: clsx@^2.1.1, tailwind-merge@^3.7.0.
3. While it runs:
- It also adds a few @keyframes (all named kn-*) to the global CSS file (globals.css or the file components.json points at). Let it: they only add animations.
- If it asks to overwrite files under lib/knowns/: these are shared by every Knowns UI item. List them, say whether I changed them (check git), and ask me before you answer.
- If it asks to overwrite any other file, show me the diff and ask me.
4. Verify:
- Every file in the list above exists.
- The project type-checks (for example `npx tsc --noEmit`) and the dev build has no new errors.
5. Use it: follow the examples and props on https://ui.knowns.dev/docs/marquee, and ask me if anything about my data is unclear.
If the Knowns UI MCP server is connected (https://ui.knowns.dev/docs/ai-and-mcp), use get_component({ name: "marquee" }) or search_docs for details.
Finish with a short summary: the files you added or changed, the packages you installed, and anything I still need to do.Props
- children
ReactNode- The items to loop. Each child is one item.
- vertical
boolean- Default
false - Top to bottom instead of sideways. Give it a height with className; it fills it.
- reverse
boolean- Default
false - 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- Default
32 - Space between items in px.
- pauseOnHover
boolean- Default
true - Hold while the pointer is over it. Focus inside always holds.
- fade
boolean- Default
true - Soft faded edges.
- paused
boolean- Hold the loop where it is (controlled).
- still
boolean- Default
false - 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- Default
false - 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.
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | - | The items to loop. Each child is one item. |
| vertical | boolean | false | Top to bottom instead of sideways. Give it a height with className; it fills it. |
| reverse | boolean | false | The other way round. |
| speed | "slow" | "normal" | "fast" | "normal" | A steady 30, 50 or 80 px per second. |
| duration | number | - | Seconds for one loop. Wins over speed. |
| gap | number | 32 | Space between items in px. |
| pauseOnHover | boolean | true | Hold while the pointer is over it. Focus inside always holds. |
| fade | boolean | true | Soft faded edges. |
| paused | boolean | - | Hold the loop where it is (controlled). |
| still | boolean | false | Show the still wrapping layout instead of the loop. Reduced motion does this on its own. |
| controls | "start" | "end" | false | "end" | Where the Pause button sits above the loop, or false for none. |
| controlsLabel | string | "marquee" | What the button's screen-reader name says is paused: "Pause marquee". |
| list | boolean | false | 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
- 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.
- 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.
- 03Pauses under the pointer and whenever focus is inside; stops offscreen and in a hidden tab, so nothing runs where nobody looks.
- 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.
- 05Hides the loop copies from screen readers and from Tab, so each item is read and reached once.
- 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
| State | What moves | Timing |
|---|---|---|
| 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" }).