Skip to content
PixiKit

Scroll Velocity Text

Rows of repeated text that drift in alternating directions and react to the scroll: they speed up, flip direction, lean and stretch with it. Rows can be grabbed and thrown, paused on hover, outlined on alternate rows and faded at the edges.

pixikit.com/docs/effects/scroll-velocity-text

Customize

Velocity100
Color
Font size80px
Font weight
Skew with velocity0°
Scale with velocity0.00
Draggable
Outline alternate
Gap0px
Damping50
Stiffness400
Num copies6
Separator
Fade edges
Pause on hover

Props

25
NameTypeDefaultDescription
scrollContainerRefRefObject<HTMLElement | null>NoneA ref to a custom scroll container. Leave it out to use the page.
textsReactNode[][]The rows. Each item is repeated across its row; strings, elements and icons all work.
velocitynumber100The base speed, in pixels per second. The direction flips for odd rows.
colorstringNoneThe text colour of the rows. Follows the surrounding text when left out.
fontSizenumber | stringNoneThe size of the row text. Numbers are pixels.
fontWeightnumber | stringNoneThe weight of the row text.
skewWithVelocitynumber0How far the rows lean into their motion at full speed, in degrees.
scaleWithVelocitynumber0How much taller the rows stretch at full speed, as a fraction of their height. Negative squashes them.
draggablebooleanfalseLets people grab a row to scrub it, then throw it to glide on.
outlineAlternatebooleanfalseDraws every other row as outlined text.
gapnumber0Extra space between the repeated copies, in pixels.
dampingnumber50The damping of the spring that smooths the scroll speed.
stiffnessnumber400The stiffness of the spring that smooths the scroll speed.
numCopiesnumber6How many copies of the text each row repeats.
separatorReactNode""Shown between the repeated copies, like a dot or a slash. Empty leaves a space.
fadeEdgesbooleanfalseFades the rows out at the left and right edges.
pauseOnHoverbooleanfalseGlides a row to a stop while the pointer is over it.
velocityMappingInputnumber[][0, 1000]The scroll speed range, in pixels per second, that maps to the multiplier range.
velocityMappingOutputnumber[][0, 5]The speed multiplier range the scroll speed maps to.
parallaxClassNamestring"parallax"Extra class names for each row.
scrollerClassNamestring"scroller"Extra class names for the moving track of each row.
parallaxStyleCSSPropertiesNoneInline styles for each row.
scrollerStyleCSSPropertiesNoneInline styles for the moving track of each row.
classNamestringNone
styleCSSPropertiesNone

More text effects in Pro

View all

Related