Marquee
ProAn infinite scroller for logos and quotes, horizontal or vertical, with faded edges.
Installation
pnpm dlx shadcn@latest add @viewport/marquee
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| reverse | booleanScroll right-to-left (or bottom-to-top) when false, the opposite when true. | — |
| pauseOnHover | booleanPause while hovered or while anything inside has keyboard focus. | true |
| vertical | boolean | — |
| duration | numberSeconds for one full loop. | 40 |
| gap | stringGap between items, any CSS length. | "1rem" |
| fade | booleanFade the edges into the background. | true |
| repeat | numberHow many copies to render. Raise it if your items don't fill the width. | 3 |
Accessibility
- Copies after the first are aria-hidden and inert, so content is read and tabbed once.
- Pauses on hover and while anything inside has keyboard focus.
- Stops under reduced motion.
- Pure CSS animation.