Perspective Marquee

A tilted wall of images that scrolls endlessly in alternating columns.

area chart previewradar chart previewsankey chart previewchoropleth chart preview
area chart previewradar chart previewsankey chart previewchoropleth chart preview
area chart previewradar chart previewsankey chart previewchoropleth chart preview
area chart previewradar chart previewsankey chart previewchoropleth chart preview
bar chart previewring chart previewscatter chart previewlive line chart preview
bar chart previewring chart previewscatter chart previewlive line chart preview
bar chart previewring chart previewscatter chart previewlive line chart preview
bar chart previewring chart previewscatter chart previewlive line chart preview
line chart previewgauge chart previewcomposed chart preview
line chart previewgauge chart previewcomposed chart preview
line chart previewgauge chart previewcomposed chart preview
line chart previewgauge chart previewcomposed chart preview
pie chart previewfunnel chart previewcandlestick chart preview
pie chart previewfunnel chart previewcandlestick chart preview
pie chart previewfunnel chart previewcandlestick chart preview
pie chart previewfunnel chart previewcandlestick chart preview

Features

  • Columns scroll in opposite directions, forever, with no gaps or jumps.
  • Hovering a column pauses it, and hovering an image lifts it.
  • The wall scales down on small screens and fades out at the edges.
  • Built on Marquee, so it needs no animation library.
  • Respects reduced motion by pausing the columns.

Installation

Cortexcn
pnpm dlx shadcn@latest add @cortexcn/perspective-marquee

The CLI also installs Marquee and adds its animations to your globals.css.

Usage

import { PerspectiveMarquee } from "@/components/perspective-marquee";
<PerspectiveMarquee
  images={[
    { src: "/screens/dashboard.png", alt: "Dashboard" },
    { src: "/screens/pricing.png", alt: "Pricing page" },
  ]}
/>

Images are spread across the columns in order, so the first image goes to the first column, the second to the second, and so on. Around 12 to 20 images fill the wall well. Images use a 4:3 frame and object-cover.

Examples

Three columns

area chart previewpie chart previewgauge chart previewscatter chart previewchoropleth chart preview
area chart previewpie chart previewgauge chart previewscatter chart previewchoropleth chart preview
area chart previewpie chart previewgauge chart previewscatter chart previewchoropleth chart preview
area chart previewpie chart previewgauge chart previewscatter chart previewchoropleth chart preview
bar chart previewradar chart previewfunnel chart previewcomposed chart previewlive line chart preview
bar chart previewradar chart previewfunnel chart previewcomposed chart previewlive line chart preview
bar chart previewradar chart previewfunnel chart previewcomposed chart previewlive line chart preview
bar chart previewradar chart previewfunnel chart previewcomposed chart previewlive line chart preview
line chart previewring chart previewsankey chart previewcandlestick chart preview
line chart previewring chart previewsankey chart previewcandlestick chart preview
line chart previewring chart previewsankey chart previewcandlestick chart preview
line chart previewring chart previewsankey chart previewcandlestick chart preview
<PerspectiveMarquee columns={3} images={images} />

As a hero background

Place it behind your content with absolute inset-0 and lower its opacity so text stays readable.

Props

PropTypeDefaultDescription
imagesPerspectiveMarqueeImage[]requiredImages for the wall, each with src and alt
columnsnumber4Number of scrolling columns
durationnumber40Seconds for one loop. Every other column runs slower
pauseOnHoverbooleantruePause a column while the pointer is over it
classNamestring-Extra classes for the container, such as a height