Marquee

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

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 by default for a seamless loop.

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

Examples

Seamless Loop

Direction

Control the scroll direction with the direction prop.

Pause on Hover

Enable pause on hover with the pauseOnHover prop.

Styling

Set infinite={false} when you only want to render the slot once.

API Reference

See the GitHub source code for more information on props.