Skip to content

Marquee

Loops a strip of content, with a control to pause it.

TypographyPhotographyEditorialIllustrationMotion
marquee-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Reverse

In a right-to-left layout, both directions change sides.

TypographyPhotographyEditorialIllustrationMotion
marquee-reverse-demo.tsx

Speed and spacing

Set speed in pixels per second and --marquee-gap for the space between items.

SerifGroteskMonoDisplayScriptSlab
marquee-speed-demo.tsx

API reference

speed: number = 50
Movement in pixels per second. Hover, focus, and the built-in button pause it. Set 0 to stop it and wrap the items. Reduced motion does the same.
reverse: boolean = false
Move the content toward the end edge instead of the start edge.
children: ReactNode
Items to loop. Do not put IDs in them, because the copies repeat them. The copies are inert and hidden from assistive technology. A focused item moves into view.
--marquee-gap: CSS length = 1.5rem
Space between items. Set it in className.