$npx @dinachi/cli@latest add marquee
VercelLinearSupabaseResendClerkNeonCal.comRaycast
durationdirectionpauseOnHoverfadelogo-strip.tsx
import { Marquee } from "@/components/ui/marquee"
const logos = ["Vercel", "Linear", "Supabase", "Resend", "Clerk", "Neon", "Cal.com", "Raycast"]
export function LogoStrip() {
return (
<Marquee className="py-2">
{logos.map((name) => (
<span key={name} className="px-5 text-lg font-semibold text-muted-foreground">
{name}
</span>
))}
</Marquee>
)
}Usage
import { Marquee } from "@/components/ui/marquee"
const logos = ["Vercel", "Linear", "Supabase", "Resend"]
export function Logos() {
return (
<Marquee>
{logos.map((name) => (
<span key={name}>{name}</span>
))}
</Marquee>
)
}Examples
VercelLinearSupabaseResendClerkNeonCal.comRaycast
A seamless loop that brakes on hover.
import { Marquee } from '@/components/ui/marquee';
const logos = ['Vercel', 'Linear', 'Supabase', 'Resend', 'Clerk', 'Neon'];
export function Example() {
return (
<Marquee className="py-2">
{logos.map((name) => (
<span
key={name}
className="whitespace-nowrap px-5 text-lg font-semibold text-muted-foreground"
>
{name}
</span>
))}
</Marquee>
);
}VercelLinearSupabaseResendClerkNeonCal.comRaycast
VercelLinearSupabaseResendClerkNeonCal.comRaycast
Two strips travelling opposite ways.
import { Marquee } from '@/components/ui/marquee';
const logos = ['Vercel', 'Linear', 'Supabase', 'Resend', 'Clerk', 'Neon'];
export function Example() {
return (
<div className="flex w-full flex-col gap-4">
<Marquee direction="left" duration={18} className="py-2">
{logos.map((name) => <Logo key={name} name={name} />)}
</Marquee>
<Marquee direction="right" duration={18} className="py-2">
{logos.map((name) => <Logo key={name} name={name} />)}
</Marquee>
</div>
);
}Focus pauses the strip, and the copy stays out of the tab order.
import { Marquee } from '@/components/ui/marquee';
const links = ['Changelog', 'Docs', 'Pricing', 'Blog', 'Careers', 'Support'];
export function Example() {
return (
<Marquee duration={30} className="py-2">
{links.map((label) => (
<a
key={label}
href={`/${label.toLowerCase()}`}
className="whitespace-nowrap rounded-md px-4 py-1.5 text-sm text-muted-foreground hover:text-foreground"
>
{label}
</a>
))}
</Marquee>
);
}VercelLinear
Fits, so it sits still
Nothing to reveal, so the strip sits still.
import { Marquee } from '@/components/ui/marquee';
// No prop turns the loop off. The marquee measures its own content and only
// animates when there is more of it than the container can show.
export function Example() {
return (
<Marquee className="py-2">
<span className="px-5 text-lg font-semibold">Vercel</span>
<span className="px-5 text-lg font-semibold">Linear</span>
</Marquee>
);
}Notes
Motion tier
Needs motion. add --all skips it; install with add --motion or by name.
Behaviour
- Content narrower than the container stays still; no prop turns the loop off.
- Stops while out of view, hovered or focused.
- Pausing eases out over 160ms; resuming takes 240ms.
- Touch does not trigger the hover pause.
- Resizes and prop changes keep its place in the loop.
API
durationnumber = 24
Seconds for one full pass of the content.direction"left" | "right" = "left"
Which way the strip travels.pauseOnHoverboolean = true
Pauses while hovered. Focus always pauses it.fadeboolean = true
Fades the leading and trailing edges while the strip moves.labelstring = "Scrolling content"
Names the strip when reduced motion makes it a scroller.Accessibility
- The duplicate copy is aria-hidden and inert: not announced, not reachable by Tab.
- Focus pauses the strip regardless of
pauseOnHover. - Reduced motion makes it a focusable scroller, role region, named by
label.
Keyboard
TabMoves into the strip and pauses it
←→Scrolls the strip under reduced motion, once it has focus
TabMoves into the strip and pauses it
←→Scrolls the strip under reduced motion, once it has focus