Marquee
Infinite scrolling rows with edge fades and pause on hover.
Open lateKaraokeNoodlesArcadeVacancyLive jazzCocktailsPachinko
Hong KongTokyoLas VegasSeoulHavanaBerlinTaipeiReno
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/marquee.jsonUsage
import { Marquee } from "@/components/ui/marquee"
<Marquee speed={40} gap={32}>
<span>Open late</span>
<span>Karaoke</span>
<span>Noodles</span>
</Marquee>Examples
Logo wall
A longer fade lets names drift in and out of the dark.
Vertical
A vertical marquee needs a height.
Pause button
For content that keeps moving, give people a visible way to stop it with paused.
API reference
Also accepts div attributes, and the ref points at the outer element. Children are the items in one run.
| Prop | Type | Default |
|---|---|---|
orientation | "horizontal"Scroll sideways, or up and down. | "horizontal" |
reverse | booleanRun left to right (or downward) instead. | false |
speed | numberSpeed in pixels per second. 0 holds it still. | 40 |
gap | numberSpace between items and between copies. A number is pixels. | 32 |
pauseOnHover | booleanEase to a stop while the pointer is over it. | true |
paused | booleanHold it still, for a visible pause button. | false |
fade | booleanFade the leading and trailing edges. A number sets the fade length in pixels (default 48). | true |
color | NeonColorSets --neon for glowing content inside. | inherited |
Accessibility
- The loop is made of copies, but only one is exposed: the others are aria-hidden and inert, so screen readers read each item once and Tab visits each link once.
- Keyboard focus inside stops it at once, and if the focused item had drifted out of view or under a fade, the row glides it to the middle.
- Hover eases the row to a stop instead of freezing it mid-frame, and leaving eases it back up.
- With reduced motion there's no animation and no copies: the row becomes an ordinary scrollable strip.
- Moving content that runs for more than five seconds needs a way to pause it (WCAG 2.2.2). Hover and focus cover pointer and keyboard users; for long-running marquees, add a button wired to paused.
- The edges clip, so give items that glow some vertical padding. Avoid ids inside: the hidden copies repeat them.