GitHub Stars

Marquee

A continuous scrolling animation component for displaying content in a loop.

ReactVueAngularSvelteAstroNext.js

Installation

npx shadcn@latest add @fulldev/marquee

Usage

import { Marquee } from "@/components/ui/marquee"
<Marquee>
  <span>Design systems</span>
  <span>Astro</span>
  <span>Content sites</span>
</Marquee>

The marquee duplicates its slot for a seamless loop.

<Marquee>
  <span>Design systems</span>
  <span>Astro</span>
  <span>Content sites</span>
</Marquee>

Examples

Seamless Loop

ReactVueAngularSvelteAstroNext.js

Direction

Control the scroll direction with the direction prop.

TypeScriptJavaScriptPythonGoRust
TypeScriptJavaScriptPythonGoRust

Vertical Direction

Use direction="top" or direction="bottom" for vertical marquee content.

PlanBuildShipMeasure
PlanBuildShipMeasure

Timing

Set the animation duration with the time prop. Numbers are treated as seconds.

FastSmoothSteadyLooping

Pause on Hover

Enable pauseOnHover to pause the animation while the marquee is hovered.

Tailwind CSSAstroTypeScriptContent

Styling

Use variant="solid" to remove the default edge fade.

No maskFull edgeSolidContinuous

API Reference

PropTypeDefault
direction"left" | "right" | "top" | "bottom""left"
timenumber | string30
pauseOnHoverbooleanfalse
variant"gradient" | "solid""gradient"
classstringundefined

See the GitHub source code for more information on props.