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.jsonTrusted by teams at
- Acme
- Globex
- Initech
- Umbrella
- Hooli
- Stark
- Wayne
- Wonka
MarqueedefaultMarqueeLabels
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.
import { Marquee } from "@/components/sheenui/marquee/marquee";
// Package build (after the first npm release, or a packed tarball): import { Marquee } from "@sheenui/theme";
const brands = [
{ name: "Acme", href: "https://example.com/acme", Logo: (props: { className?: string }) => <svg viewBox="0 0 24 24" aria-hidden {...props}><circle cx="12" cy="12" r="10" fill="currentColor" /></svg> },
{ name: "Globex", href: "https://example.com/globex", Logo: (props: { className?: string }) => <svg viewBox="0 0 24 24" aria-hidden {...props}><rect x="3" y="3" width="18" height="18" rx="4" fill="currentColor" /></svg> },
{ name: "Initech", href: "https://example.com/initech", Logo: (props: { className?: string }) => <svg viewBox="0 0 24 24" aria-hidden {...props}><path d="M12 2l10 18H2z" fill="currentColor" /></svg> },
];
export function Example() {
return (
<Marquee listLabel="Customers" speed={36} gap={48}>
{brands.map((brand) => (
<a
key={brand.name}
href={brand.href}
className="flex min-h-11 items-center gap-2 rounded-sheen-sm px-2 text-lg font-semibold text-sheen-fg-muted hover:text-sheen-fg"
>
<brand.Logo className="size-6" />
{brand.name}
</a>
))}
</Marquee>
);
}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
import { useState } from "react";
import { Button } from "@/components/sheenui/button/button";
import { Marquee } from "@/components/sheenui/marquee/marquee";
// Package build (after the first npm release, or a packed tarball): import { Button, Marquee } from "@sheenui/theme";
const reviews = [
{ name: "Asha", text: "Best docs I have read this year." },
{ name: "Ravi", text: "Dropped into our app in an afternoon." },
{ name: "Meera", text: "The glass looks great in dark mode." },
];
function Review({ name, text }: (typeof reviews)[number]) {
return (
<figure>
<blockquote className="text-sm">{text}</blockquote>
<figcaption className="mt-2 text-xs text-sheen-fg-muted">{name}</figcaption>
</figure>
);
}
export function Example() {
const [paused, setPaused] = useState(false);
return (
<>
<Marquee
listLabel="What people say"
paused={paused}
controls={false}
itemClassName="glass-1 w-64 self-stretch rounded-sheen-lg p-5 sm:w-72"
>
{reviews.map((review) => <Review key={review.name} {...review} />)}
</Marquee>
<Marquee
reverse
speed={30}
listLabel="More reviews"
paused={paused}
controls={false}
itemClassName="glass-1 w-64 self-stretch rounded-sheen-lg p-5 sm:w-72"
>
{reviews.map((review) => <Review key={review.name} {...review} />)}
</Marquee>
<Button variant="glass" size="sm" onClick={() => setPaused(!paused)}>
{paused ? "Play reviews" : "Pause reviews"}
</Button>
</>
);
}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
import { useState } from "react";
import { Button } from "@/components/sheenui/button/button";
import { Marquee } from "@/components/sheenui/marquee/marquee";
// Package build (after the first npm release, or a packed tarball): import { Button, Marquee } from "@sheenui/theme";
const items = ["Fast", "Accessible", "Themeable", "Typed", "Small"];
export function Example() {
const [paused, setPaused] = useState(false);
return (
<>
<div className="grid gap-4 sm:grid-cols-3">
<Marquee vertical speed={28} paused={paused} controls={false} className="h-[28rem]" itemClassName="glass-1 w-full rounded-sheen-lg p-5">
{items.map((item) => (
<p key={item}>{item}</p>
))}
</Marquee>
<Marquee vertical reverse speed={22} paused={paused} controls={false} className="hidden h-[28rem] sm:flex" itemClassName="glass-1 w-full rounded-sheen-lg p-5">
{items.map((item) => (
<p key={item}>{item}</p>
))}
</Marquee>
<Marquee vertical speed={34} paused={paused} controls={false} className="hidden h-[28rem] sm:flex" itemClassName="glass-1 w-full rounded-sheen-lg p-5">
{items.map((item) => (
<p key={item}>{item}</p>
))}
</Marquee>
</div>
<Button variant="glass" size="sm" onClick={() => setPaused(!paused)}>
{paused ? "Play columns" : "Pause columns"}
</Button>
</>
);
}Props
MarqueeLabels keys and English defaults (2)
Keyboard
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
Related pages
19 effects pages in all: browse them on All effects.
By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .