Marquee

Infinite horizontal scrolling strip of content, used as an ambient ticker or logo wall. Renders children twice in a track that translates by exactly -50% for a seamless loop.

Installation

npx dafink-ui add marquee

Demo

FastAccessibleComposableToken-driven

Props

NameTypeDefaultDescription
direction'left' | 'right''left'Scroll direction of the track.
durationnumber20Seconds for one full loop of the track.
pauseOnHoverbooleantruePause the scroll animation while the pointer hovers the marquee.
gapnumber16Pixel gap between repeated copies of the content.
childrenReactNode-Required. The content to repeat and scroll.
classNamestring''Additional CSS classes.

Accessibility

Marquee's scroll is a pure CSS @keyframes animation, disabled by its own @media (prefers-reduced-motion: reduce) block, which also hides the duplicate copy so reduced-motion users see one static row instead of a frozen mid-scroll frame. The duplicate copy is aria-hidden in every motion state to avoid double-announcing repeated content; the first copy is real content and is not aria-hidden. Marquee wraps children without adding any keyboard or focus behavior of its own — any interactive children keep their native tab order.