Animated React carousels and galleries

Ribbon gallery

An endless ribbon of cards curved like a wraparound screen and tilted across the frame. Drag or flick it and it ripples like fabric with motion blur along its length.

Galleries, drag, Motion

Install

npm i clsx lucide-react motion tailwind-merge && curl -o components/ribbon-gallery.tsx https://motion-brew.com/r/ribbon-gallery.tsx

One self contained file for React and Tailwind CSS: ribbon-gallery.tsx. Or ask your AI agent to add it through the MCP server.

Usage

import { RibbonGallery } from "@/components/ribbon-gallery";

export default function Page() {
  return (
    <RibbonGallery
      className="h-screen bg-black"
      items={[
        { src: "/work/liquid.jpg", title: "Liquid Echo", href: "/work/liquid" },
        { src: "/work/mirage.jpg", title: "Blue Mirage", href: "/work/mirage" },
        { src: "/work/bloom.jpg", title: "Neon Bloom", href: "/work/bloom" },
      ]}
    />
  );
}

Props

PropTypeDefaultDescription
items{ src; title; alt?; href? }[]sample photosCards on the ribbon, repeated to loop
anglenumber20Tilt across the frame, degrees; 0 is horizontal
curvenumber0.45Curvature, 0 (flat) to 1 (tight)
cardWidthnumber230Card width, px
cardHeightnumber290Card height, px
gapnumber14Space between cards, px
driftnumber30Idle drift, px/s; 0 stops it
momentumnumber0.65How far a flick carries, 0 to 1
wavenumber1Ripple strength, 0 to 2; always gently on, stronger while moving
blurnumber9.5Strongest motion blur along the ribbon, px
introbooleantrueSweep in on first view
wheelbooleantrueWheel and trackpad move it while hovered
dimnumber0.75How far other cards fade back while one is hovered, 0 to 1
dimColorstringlight grayColor the other cards fade toward; match your background
labelstring"Project ribbon"Accessible name
classNamestringSize and background

More galleries

  • Infinite gallery: An endless wall of work that loops seamlessly in every direction.
  • Project index: An editorial project index with large photography: hover a project and its image arrives through a pixel, grain, gradient or mirror transition, then open it with one press.
  • Prism carousel: An endless carousel circling through liquid glass lenses at both edges.
  • Tilt carousel: A looping row of photo cards that glides on its own: the middle one faces you while the rest turn away in 3D.

All animated react carousels and galleries