Skip to Content

Marquee

Infinite scrolling content strip. Content is automatically duplicated for seamless looping. Respects prefers-reduced-motion.

Props

PropTypeDefaultDescription
childrenReactNodeContent to scroll (duplicated internally for seamless looping)
speednumber50Scroll speed in pixels per second
direction'left' | 'right' | 'up' | 'down''left'Scroll direction
pauseOnHoverbooleantruePause scrolling on hover
gapnumber | string0Gap between original and duplicated content
autoStartbooleantrueStart on mount
classNamestringContainer className
styleCSSPropertiesContainer style

Ref Handle

MethodDescription
start()Start or resume the scrolling animation
pause()Pause the scrolling animation

Example

<Marquee speed={60} pauseOnHover> <span>Free shipping on all orders</span> <span>Use code SAVE20 for 20% off</span> <span>Limited time offer</span> </Marquee>
Last updated on