Interaction
Marquee
Scroll-velocity-boosted infinite marquee. Vanilla Custom Element.
- gsap
Preview
Scroll the page to see the marquee speed up. Content is slotted. Drop any HTML inside.
Attributes
Installation
pnpm dlx shadcn@latest add https://motion-kit-astro.vercel.app/r/marquee.json Usage
---
import "@/components/motion-kit/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 |