Skip to main content
Mantı UI logoMantı UIv0.12.1
Studio

Marquee

Marquee duplicates children for a seamless CSS loop and hides the duplicate from assistive technology. It stops under reduced motion.

import { Badge, Marquee } from '@manti-ui/react';

const tags = [
  'Framework-agnostic',
  'Zag.js machines',
  'Design tokens',
  'light-dark()',
  'Monochrome',
  'Accessible',
];

export default function MarqueeBasic() {
  return (
    <Marquee>
      {tags.map((t) => (
        <Badge key={t} variant="secondary">
          {t}
        </Badge>
      ))}
    </Marquee>
  );
}

Direction

Use left, right, up, or down. Vertical marquees need a bounded height. speed is the duration of one pass.

Framework-agnosticZag.js machinesDesign tokensMonochromeAccessible
Framework-agnosticZag.js machinesDesign tokensMonochromeAccessible

API

PropTypeDefaultDescription
childrenReactNodeContent to scroll. It is duplicated to make the loop seamless.
direction'left' | 'right' | 'up' | 'down''left'Scroll direction. Vertical (`up`/`down`) needs the root to have a height.
speednumber20Seconds for one full loop. Higher is slower.
pauseOnHoverbooleantruePause the scroll while the pointer is over it.
gap'sm' | 'md' | 'lg''md'Spacing between the repeated content.

Styling

Anatomy

PartSelectorDescription
root[data-scope="marquee"][data-part="root"]The clipping wrapper carrying direction, gap, and pause state.
content[data-scope="marquee"][data-part="content"]The translating track that holds both copies of the content.
group[data-scope="marquee"][data-part="group"]One copy of the content; the second copy is hidden from assistive tech.

Tokens

TokenControls
--manti-marquee-gapgap
--manti-marquee-durationduration

Last updated

Built end-to-end with Manti UI components and design tokens. Manti UI is a framework-agnostic design system on Zag.js.

GitHub