Marquee
An endlessly scrolling row that pauses on hover and focus.
Animatedimport { Marquee } from 'umbra-ui/motion'
Props
| Prop | Type | Default | Description |
|---|---|---|---|
direction | "left" | "right" | left | Scroll direction. |
fade | boolean | true | Fade the left and right edges. |
gap | "0" | "10" | "0.5" | "1" | "1.5" | "2" | "3" | "4" | "5" | "6" | "8" | "12" | "16" | 8 | Space between items, as a spacing token step. |
paused | boolean | false | Pause from outside, e.g. from a "pause animations" control. |
pauseOnHover | boolean | true | Pause while hovered or while focus is inside (WCAG 2.2.2). |
reducedMotion | "system" | "always" | "never" | "system" | Reduced-motion override. Under reduced motion the items wrap in place and nothing moves. |
speed | number | 1 | Speed multiplier; 1 scrolls the content once per four `duration-loop` tokens. |
Usage notes
Content is duplicated once to loop seamlessly.
Accessibility
- Pauses on hover and while focus is inside (WCAG 2.2.2);
pausedgives you an external control. - The duplicate copy is
aria-hiddenandinert, so links are not announced or focused twice. - Under reduced motion items wrap statically and nothing is duplicated.
Import
import { Marquee } from 'umbra-ui/motion';
import 'umbra-ui/styles.css'; // once, at the root of your app