← Prev106/129Next →
ReactBits

ReactBits

ScrollVelocity

Horizontal text marquee that reacts to scroll velocity. Text direction reverses when scrolling up. Powered by Motion.

Default (velocity=100)

SCROLL VELOCITY SCROLL VELOCITY SCROLL VELOCITY SCROLL VELOCITY SCROLL VELOCITY SCROLL VELOCITY 
REACT BITS REACT BITS REACT BITS REACT BITS REACT BITS REACT BITS 
velocity=100numCopies=6

Fast (velocity=300)

SPEED SPEED SPEED SPEED SPEED SPEED 
MOTION MOTION MOTION MOTION MOTION MOTION 
VELOCITY VELOCITY VELOCITY VELOCITY VELOCITY VELOCITY 
velocity=3003 text rows (alternating direction)

Slow and smooth (velocity=40, low stiffness)

BEIRUX DIGITAL AGENCY BEIRUX DIGITAL AGENCY BEIRUX DIGITAL AGENCY BEIRUX DIGITAL AGENCY BEIRUX DIGITAL AGENCY BEIRUX DIGITAL AGENCY 
DESIGN + ENGINEERING DESIGN + ENGINEERING DESIGN + ENGINEERING DESIGN + ENGINEERING DESIGN + ENGINEERING DESIGN + ENGINEERING 
velocity=40damping=80stiffness=200

Props

PropTypeDefaultDescription
textsReactNode[][]Array of text/nodes; each becomes a row, alternating direction
velocitynumber100Base scroll speed in px/s (even rows move opposite)
classNamestring""Classes applied to each text span copy
dampingnumber50Spring damping for velocity smoothing
stiffnessnumber400Spring stiffness for velocity smoothing
numCopiesnumber6How many copies of the text to render (seamless loop)
velocityMapping{ input: [n,n], output: [n,n] }{ input: [0,1000], output: [0,5] }Maps scroll velocity to speed multiplier
scrollContainerRefRefObject<HTMLElement>undefinedCustom scroll container (defaults to window)
parallaxClassNamestringundefinedClass for the outer overflow container
scrollerClassNamestringundefinedClass for the inner motion div
parallaxStyleCSSPropertiesundefinedInline styles for outer container
scrollerStyleCSSPropertiesundefinedInline styles for inner motion div