Skip to content
Premium & Brand

Marquee

Seamless infinite scroller for logos, testimonials, or a ticker.

Import

tsx
import { Marquee } from "@cooud-ui/ui";
bash
npx cooud-ui add marquee

Examples

API Reference

Generated from the component's exported types.

MarqueeProps

Extends HTMLAttributes<HTMLDivElement>

PropTypeDefaultDescription
children*
ReactNodeThe items to scroll — logos, cards, testimonials, or a text ticker.
direction
"left" | "right""left"Scroll direction. Horizontal: `"left"` (default) | `"right"`. When is set, the same prop reads as `"up"` (default) | `"down"` — i.e. `"left"`/`"up"` share the forward sense and `"right"`/`"down"` the reverse, so one prop covers both axes.
vertical
booleanfalseScroll the marquee on the vertical axis instead of the horizontal one.
speed
numberDEFAULT_SPEEDTravel speed in **pixels per second** — resolution-independent and stable across content widths (the loop duration is derived from the measured track size). Defaults to `40` (a tasteful, slow drift).
pauseOnHover
booleantruePause the scroll while the pointer is over the marquee. Defaults to `true`.
fade
booleantrueFade the leading and trailing edges into the background with a gradient `mask-image`, so items dissolve rather than clip. Defaults to `true`.
gap
stringDEFAULT_GAPSpacing between repeated items. Accepts any CSS length. Defaults to `"1rem"`.
repeat
numberDEFAULT_REPEATHow many copies of are rendered back-to-back. The track translates by exactly one copy, so any count ≥ 2 loops seamlessly. Defaults to `2`; raise it when a single copy cannot fill wide viewports (leaving a visible gap before the loop point).
motionPreference
MarqueeMotionPreference"respect"Whether the marquee scrolls vs. honours `prefers-reduced-motion`: `"respect"` (default), `"always"` (force motion), or `"never"` (force static). Defaults to `"respect"`.
groupClassName
stringClass applied to each repeated copy (the flex row/column of items).