Skip to content
roguelite labsAnthony Spezzano ↗
motion/infinite-slider

Infinite Slider

CSS marquee. Children are duplicated and animated with translateX for a seamless infinite loop. No JS timers.

Use and inspectUse this when the motion supports the surrounding content. Connect callbacks and state to your app, keep the reset preview as a local demonstration, and add a reduced-motion fallback for movement or looping. The preview is synthetic; it does not call a backend.Next: inspect the source below and replace the demo inputs with your own data.
Infinite SliderCSS marquee. Children are duplicated and animated with translateX for a seamless infinite loop. No JS timers.

Props

PropTypeDefaultDescription
childrenrequiredReactNodeContent to loop
speednumber40Scroll speed (px/s equivalent)
gapnumber16Gap between items in px
reversebooleanfalseReverse scroll direction