Skip to Content
Documentation
Getting startedComponentsChartsTheming
Get Pro
Overview
Concepts

Marquee

Create a continuous scrolling display of logos, images, or text horizontally or vertically

Recipe

Anatomy

import { Marquee } from '@chakra-ui/react'
<Marquee.Root>
  <Marquee.Viewport>
    <Marquee.Content>
      <Marquee.Item />
    </Marquee.Content>
  </Marquee.Viewport>
</Marquee.Root>

Use the autoFill prop to repeat the items until the viewport is filled, and the spacing prop to control the gap between the repeated groups.

Examples

Reversed

Use the reverse prop on the Marquee.Root component to reverse the direction of the marquee.

Vertical

To animate content along the Y axis, use the side prop and set it to bottom.

Speed

Use the speed prop to control the animation speed in pixels per second.

Slow (25px/s)
Normal (50px/s)
Fast (100px/s)

Pause On Interaction

Use the pauseOnInteraction prop to pause the animation when the user hovers or focuses the marquee.

Edge Gradient

Render the Marquee.Edge component to apply an edge fade.

Testimonials

You can display testimonials with the marquee component.

This library saved me weeks of work. The components are accessible and easy to customize.

SC
Sarah Chen
Product Designer

The animations are buttery smooth. I love how easy it is to implement the marquee.

MT
Michael Torres
Frontend Dev

Scalable, reliable, and beautiful. Highly recommended for any modern web project.

EW
Emily Wang
CTO

Our conversion rates increased by 15% after switching to this UI system.

DS
David Smith
Marketing Lead

Documentation is top-notch. I was able to build my MVP in a single weekend.

JL
Jessica Lee
Indie Hacker

Finite Loops

To loop the marquee a finite number of times, set the loopCount prop on Marquee.Root. Alternatively, use the onLoopComplete and onComplete callbacks to track the number of completed loops or when the animation fully finishes.

<Marquee.Root
  loopCount={3}
  onLoopComplete={() => {
    /* handle loop completion */
  }}
  onComplete={() => {
    /* handle animation end */
  }}
>
  {/* Marquee.Item elements */}
</Marquee.Root>

CSS Variables

The marquee component exposes CSS variables that can be used to customize its behavior and appearance.

<Marquee.Root
  css={{
    '--marquee-duration': '30s',
    '--marquee-delay': '0s',
    '--marquee-loop-count': 'infinite',
    '--marquee-edge-color': 'colors.bg',
    '--marquee-edge-size': '20%',
  }}
>
  {/* ... */}
</Marquee.Root>
VariableDescriptionDefault
--marquee-durationAnimation durationComputed
--marquee-delayAnimation delay before starting0s
--marquee-loop-countNumber of animation iterationsinfinite
--marquee-edge-colorColor for the edge gradient overlaycolors.bg
--marquee-edge-sizeSize of the edge gradient20%

Props

PropDefaultType
autoFill false
boolean

Whether to automatically duplicate content to fill the container.

defaultPaused false
boolean

Whether the marquee is paused by default.

delay '0'
number

The delay before the animation starts (in seconds).

loopCount '0'
number

The number of times to loop the animation (0 = infinite).

pauseOnInteraction false
boolean

Whether to pause the marquee on user interaction (hover, focus).

reverse false
boolean

Whether to reverse the animation direction.

side '\'start\''
Side

The side/direction the marquee scrolls towards.

spacing '\'1rem\''
string

The spacing between marquee items.

speed '50'
number

The speed of the marquee animation in pixels per second.

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.
ids
Partial<{ root: string; viewport: string; content: (index: number) => string }>

The ids of the elements in the marquee. Useful for composition.

onComplete
() => void

Function called when the marquee completes all loops and stops. Only fires for finite loops (loopCount > 0).

onLoopComplete
() => void

Function called when the marquee completes one loop iteration.

onPauseChange
(details: PauseStatusDetails) => void

Function called when the pause status changes.

paused
boolean

Whether the marquee is paused.

translations
IntlTranslations

The localized messages to use.