Skip to content

React Marquee

A React marquee for an endless, seamless strip of logos or testimonials that eases to a stop under the mouse or keyboard focus. Use it as an infinite logo carousel for a trusted-by strip under a landing page hero, where customer logos scroll in a seamless loop at a steady speed in pixels per second.

npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/marquee.json

Trusted by teams at

  • Acme
  • Globex
  • Initech
  • Umbrella
  • Hooli
  • Stark
  • Wayne
  • Wonka

Logo cloud

The list is read once by screen readers and is in the tab order once. The copies that fill the strip are hidden from both, but stay clickable. Tab to a logo that is off to the side and it glides into the middle. The Pause button sits below the strip and comes first in the tab order.

Files to copy

7 folders · 13 files · 4 packages
From theme/src/
  • components/marquee/
  • components/button/
  • components/spinner/
  • hooks/{use-controllable.ts, use-direction.ts, use-intersection.ts, use-latest.ts, use-magnetic.ts, use-media-query.ts, use-preferences.ts}
  • motion/{gate.ts, tokens.ts}
  • lib/{cn.ts, form.ts, state-light.tsx, warn-once.ts}
  • styles/
shadcn CLI
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/marquee.jsonRegistry item: marquee. The styles need the Tailwind v4 glass UI setup.
Packages
pnpm add @base-ui/react clsx motion tailwind-merge

Testimonials in glass

Level-1 glass items (tint, rim and light, no blur of their own) keep a moving strip cheap: a blurred card re-blurs its backdrop on every frame it moves, and a dozen in view would blow the glass budget. Put a blurred level (glass-2) on the items and the edges fade card by card instead, each card masked on its own glass element so its blur keeps working (a mask on the strip would switch it off). Both rows share one Pause button.

  • “The glass actually stays readable. First theme I've shipped without a contrast fight.”
    Ana RibeiroDesign lead, Lumina
  • “Reduced motion is handled everywhere. Our accessibility audit had nothing to say.”
    Kenji WatanabeFrontend, Vertex
  • “Copied four components and had a landing page that looked custom by lunch.”
    Priya NatarajanFounder, Helix
  • “The springs feel expensive. Exits are quicker than entrances, which is exactly right.”
    Marcus LeeEngineer, Quanta
  • “Dark mode isn't an afterthought: every token was clearly checked twice.”
    Sofia GrecoProduct designer
  • “Typed props, Base UI underneath, nothing magic. Easy to own.”
    Tom BeckerCTO, Orbitly
  • “Typed props, Base UI underneath, nothing magic. Easy to own.”
    Tom BeckerCTO, Orbitly
  • “Dark mode isn't an afterthought: every token was clearly checked twice.”
    Sofia GrecoProduct designer
  • “The springs feel expensive. Exits are quicker than entrances, which is exactly right.”
    Marcus LeeEngineer, Quanta
  • “Copied four components and had a landing page that looked custom by lunch.”
    Priya NatarajanFounder, Helix
  • “Reduced motion is handled everywhere. Our accessibility audit had nothing to say.”
    Kenji WatanabeFrontend, Vertex
  • “The glass actually stays readable. First theme I've shipped without a contrast fight.”
    Ana RibeiroDesign lead, Lumina

Vertical

Columns scroll at different speeds and directions. Give a vertical marquee a height; with reduced motion it keeps that height and scrolls instead.

  • “The glass actually stays readable. First theme I've shipped without a contrast fight.”
    Ana RibeiroDesign lead, Lumina
  • “Reduced motion is handled everywhere. Our accessibility audit had nothing to say.”
    Kenji WatanabeFrontend, Vertex
  • “Copied four components and had a landing page that looked custom by lunch.”
    Priya NatarajanFounder, Helix
  • “The springs feel expensive. Exits are quicker than entrances, which is exactly right.”
    Marcus LeeEngineer, Quanta
  • “Dark mode isn't an afterthought: every token was clearly checked twice.”
    Sofia GrecoProduct designer
  • “Typed props, Base UI underneath, nothing magic. Easy to own.”
    Tom BeckerCTO, Orbitly

Props

PropTypeDefaultDescription
children (required)ReactNodeNoneThe items: each child is one item (a logo, a card…).
speednumber40Sets the speed in px per second.
reversebooleanfalseMove towards the end (right in LTR, or down when vertical) instead of the start.
verticalbooleanfalseScroll vertically. Give the marquee a height with className (default h-96).
gapnumber24Sets the space between items, in px.
pauseOnHoverbooleantrueEase to a stop while the mouse is over it.
fadebooleantrueFades out the two edges of the strip.
fadeSizenumber64Length of each faded edge, in px (at most 12% of the strip, so narrow strips stay readable).
controlsbooleantrueShow the Pause / Play button. Keep it unless you provide your own control (WCAG 2.2.2).
pausedbooleanNonePaused (controlled). Use with onPausedChange, e.g. to drive several marquees from one button.
defaultPausedbooleanfalseStarts in the paused state (uncontrolled).
onPausedChange((paused: boolean) => void)NoneCalled when the Pause / Play button is pressed.
listLabelstringNoneAccessible name for the list of items, e.g. "Customers".
itemClassNamestringNoneClasses for every item (<li>). Put a glass class here to make each item a glass card.
labelsPartial<MarqueeLabels>defaultMarqueeLabelsText of the Pause / Play button; a partial object over the English defaults, so pass only the keys you translate. Every other string, for translation: labels={{ pause: "…" }}; omitted keys keep the English of defaultMarqueeLabels. All 2 keys of MarqueeLabels are listed in the key table under the props table.
MarqueeLabels keys and English defaults (2)
Pass any key in labels; the rest keep the defaults of defaultMarqueeLabels.
KeyEnglish default
pausePause animation
playPlay animation

Keyboard

KeysAction
TabReach the Pause / Play button first, then the real items.
Enter/SpacePause or resume the strip.

Accessibility

  • Mouse over it, or keyboard focus inside it, eases it to a stop (and back up after); focusing an off-screen item glides it into view.
  • The strip has a Pause / Play button (WCAG 2.2.2). The list is rendered once for assistive tech; the repeated copies are aria-hidden and out of the tab order. listLabel names the list.
  • Under reduced motion it does not move, and the copies, the edge fade and the button are dropped.

All exports on this page

  • Marquee — Marquee: an endless, seamless row (or column) of logos, testimonials, anything.
  • defaultMarqueeLabels — The English MarqueeLabels used when labels is omitted; a partial labels prop is merged over it.

When to use the marquee effect

  • Use it for a Trusted by strip of customer logos below a landing page hero, or a row of short testimonials, that scrolls on its own at a steady pace.
  • Use it for a review wall or testimonial rows, running two marquees in opposite directions with reverse, or a vertical column with vertical and a fixed height for a sidebar of quotes.
  • Pass itemClassName with a glass class to turn every item into a glass card; the edge fade is then applied item by item so the backdrop blur keeps working.
  • Skip it when the content is long, must be read carefully or contains important actions; moving content competes for attention, so use a static grid where users control the pace.
  • Pair it with Avatar and Badge for testimonial cards, GlassCard for each item, and a Switch or your own button wired to the paused prop to control several marquees at once.

Frequently asked questions

19 effects pages in all: browse them on All effects.

By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .