Pixelated Image Effect
Cursor
A self-drifting image strip that users can grab, drag, and throw, with momentum that eases back into the loop.
Draggable Marquee gives repeated content a second mode: drift for rhythm, drag for choice.
Use Draggable Marquee when continuous motion should invite interruption. Brand campaigns and editorial pages use it best when visitors can grab a stream of images and fling it in either direction. The default component ships a set of four images, so swap the marqueeImages list in the source for your own visuals. The page job is participation: the marquee should feel alive because the visitor can steer it.
In production, the risk is control. The strip only stops while it is held, unless you set pauseOnHover, which is off by default. Without that, it becomes background noise with a pointer event attached.
import DraggableMarquee from "@/components/effects/draggable-marquee"; const page = () => { return ( <> <DraggableMarquee/> </> );}; export default page;A campaign page showing a strip of key visuals: Draggable Marquee lets visitors grab the stream, throw it backwards or forwards, and hold it still to look closer. With pauseOnHover enabled it also stops while the pointer rests on it. The outcome is participation: the section feels active without hiding the content.
The strip moves with a transform on a single track and wraps endlessly, so cost stays low. Its ticker callback detaches when the section is offscreen or the tab is hidden, and the Draggable, observers, and listeners are cleaned up on unmount. Pre-size your images so remeasuring on load does not shift the loop.
The strip has no keyboard control and the default images carry placeholder alt text, so put any meaningful content in HTML outside it and replace the alt text with your own. Touch dragging works on mobile, and below 768px the images switch to a fixed 320px width. With reduced motion, the strip does not drift and a drag stops exactly where you let go, with no momentum.
| Prop | Type | Default | Description |
|---|---|---|---|
speed | number | 7.2 | Autoplay movement speed (px per tick). |
pauseOnHover | boolean | false | Pauses autoplay while hovered. |
throwMultiplier | number | 2.8 | Drag-release momentum strength. |
throwFriction | number | 0.975 | Momentum decay rate per frame after a drag release - closer to 1 coasts longer. |
It gives a repeating strip two modes: it drifts on its own for rhythm, and the user can grab and drag it to take control. A standard reveal is a one-way entrance; this is an ongoing, optionally interactive band. Use it for logos, tags, or proof that should move but also invite a flick.
Touch already implies dragging, and the strip responds to a horizontal swipe; check that it doesn't fight vertical page scroll on your layout. Lower the speed prop if the drift competes with the user. With reduced motion, the strip stays still until dragged and has no momentum after release.
Verify drag and native scroll don't conflict, and that momentum settles predictably with your throwMultiplier and throwFriction values. The strip has no keyboard control and its items are images, so anything keyboard users need must also exist elsewhere on the page. Replace the placeholder alt text on the default images.
Short, equal-weight, repeatable visuals where order isn't critical. The default component renders a list of images, which you change in the source. It's wrong for sequential arguments or anything that must be read top to bottom. Keep each item glanceable.
Avoid it for important sequential content, for anything that must be fully read, or where horizontal drag would interfere with scrolling on touch. If the items carry real meaning that order conveys, use a list. Skip it when motion is the only reason it's there.
Need a custom effect? Tell us what to create.