Marquee
ComponentsMarquee
Layout

Marquee

An endless rhythm of words, logos, or cards with just the right amount of energy.

React + CSS
THOUGHTS IN CONSTANT MOTION
STAY CURIOUS ✳
MAKE SOMETHING ↗
A little momentum goes a long way.Hover to pause.
Live component. Go ahead, interact.
01

Installation

Run this in your shadcn-configured React project. The component and stylesheet are added together.

TERMINAL
npx shadcn@latest add http://localhost:5173/r/marquee.json

This command uses the current site address. For localhost, keep this preview running on the same computer. Files follow your configured components alias.

02

Usage

Import the component and make the details your own.

TypeScript
import { Marquee } from '@/components/anticraft/Marquee';

export function Example() {
  return (
    <Marquee speed={24} pauseOnHover>
      <span>Independent spirit</span>
      <span>Thoughtful details</span>
      <span>Free to create</span>
    </Marquee>
  );
}
03

Props

PropTypeDefaultDescription
childrenReactNodeRequiredItems to repeat. One copy is exposed to assistive technology.
speednumber24The duration of a complete loop in seconds. Lower values scroll faster.
reversebooleanfalseReverses the scrolling direction.
pauseOnHoverbooleantruePauses while the pointer hovers. Keyboard focus always pauses the strip.
classNamestring''Additional classes for the outer strip.
04

Motion & accessibility

Considered by default.

A persistent pause button and focus pause give users control. Reduced motion removes the animation and duplicate content, leaving a static, wrapping strip.

Use semantic content and meaningful labels in your composition. Check contrast and keyboard behavior with your own styles and content.