Skip to content
Thrum

Marquee

An endless row of items that scrolls by itself: customer logos, quotes, headlines. Use it for content that is pleasant to glimpse and fine to miss. For figures a reader needs to compare, use a table or a list; for live prices, the ticker tape.

Install

npx shadcn@latest add @thrum-pro/marquee

This is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.

Props

PropTypeDefaultDescription
childrenReactNodeRequiredThe items. They are laid out in a row (or a column) with gap between them, and drawn twice.
direction"left" | "right" | "up" | "down"Default "left"Which way the content travels. up and down need a height on the marquee, through className.
speednumberDefault 40Speed in pixels per second, the same however long the content is.
gapnumberDefault 32Space between items, and between the end of the content and its copy, in pixels.
fadebooleanDefault trueFade the content out over the last 48 pixels at each travelling edge (trailing edge only while paused so the first item stays crisp).
pauseOnHoverbooleanDefault trueStop while the pointer is over the marquee and while focus is inside it.
pausedbooleanDefault falseFreeze the content where it is.
asListbooleanDefault falseRender each copy as a <ul>, for content that is a list. Give it <li> children.
reducedMotion"scroll" | "wrap"Default "scroll"What the content becomes under reduced motion: one row that scrolls by hand, or items that wrap onto more lines.
classNamestring–Extra classes, merged last. Set the width here, and the height for up and down.
...propsComponentProps<"div">–Every other div attribute is passed through. Give a marquee of meaningful content role="region" and an aria-label.

Motion and sound

Motion

  • The content and a copy of it, end to end, slide by one copy's length and start again, so the seam never shows. The speed is constant, 40 pixels a second by default.
  • It is a CSS animation of translate. The duration is the content's length divided by the speed, measured once and again on resize, without a React render.
  • Each copy is at least as wide as the marquee, so short content spreads out to fill it rather than leave a hole.
  • It stops while the pointer is over it and while focus is inside it. paused freezes it where it is.
  • Reduced motion: it stands still, the copy is gone, the edges stop fading, and the row scrolls by hand (or wraps, with reducedMotion="wrap").

Sound

Silent. This component makes no sound.

Accessibility

  • Screen readers read the content once. The copy is aria-hidden and inert: it takes no focus and no clicks.
  • Moving content that runs for more than 5 seconds needs a way to stop it. Pausing on hover and focus is one; for content that matters, offer a pause button that sets paused, or leave the marquee paused until the reader starts it.
  • Under reduced motion every item is reachable by scrolling, and nothing is hidden behind a fade.
  • The marquee adds no role. Give one whose content matters role="region" and an aria-label, so a screen reader can tell where it starts.
KeysAction
TabMoves to a link or button inside the marquee, which stops it. Only the first copy takes focus.

Source

SourcePro

The source comes with Pro

TypeScript source · Copy-paste ready · MIT-compatible for client projects · Includes all dependencies

Files and dependencies

Adds
components/ui/marquee.tsx
Packages
None
Brings along
Nothing

Changelog

  1. 1.0.0 · 2026-12-03First release.

Loading index…

Keyboard shortcuts

/Ctrl KSearch components, docs and actions
?Show this list
AAppearance studio
SSound on or off
MFull or reduced motion
TTheme: auto, light, dark
GSurface: solid or frosted
BBackdrop photograph (under glass)
CCorner radius: square to round
RReplay the demo, on a component page
DDraw new data, on a component page
←→HomeEndMove the cursor in a focused chart
EscClose a dialog, or leave a chart cursor