Interaction
Marquee
Scroll-velocity-boosted infinite marquee. Vanilla Custom Element.
- gsap
GSAPAnimate anything. Silky-smooth performance.
Preview
Scroll the page to see the marquee speed up. Content is slotted. Drop any HTML inside.
Attributes
Installation
pnpm dlx motion-blocks add marquee Usage
---import "@/components/motion-blocks/marquee-element.ts";--- <motion-marquee gap="32" duration="10"> <img src="/logo-a.svg" alt="A" /> <img src="/logo-b.svg" alt="B" /></motion-marquee> API Reference
| Attribute | Type | Default |
|---|---|---|
gap Space between items in pixels. | number | 32 |
duration Seconds for one full loop at rest. | number | 5 |
velocity Scroll velocity multiplier for the speed boost effect. | number | 0.5 |
repeat Number of times to duplicate the slotted content for a seamless loop. | number | 3 |
reversed Present to reverse the scroll direction. | boolean | false |