3D Bend Carousel

A physics-driven bent stack of cards - drag, wheel, keyboard, snap, and optional autoplay. Pass items or image URLs; install ships demo photos next to the component.

Default

Vertical concave bend with drag, snap, loop, and autoplay. Off-center cards fade to grayscale; glare tracks the curve.

Loading…

Installation

CLI
npx @sonojs/ui@latest add 3d-bend-carousel
Also needsnpm i lucide-react

Usage

Demo images install under components/carousels/3d-bend-carousel/images/ and are imported by the defaults. Pass your own items when you replace them.

page.tsx
"use client"

import { ThreeDBendCarousel } from "@/components/carousels/3d-bend-carousel"

export default function Page() {
  return (
    <ThreeDBendCarousel
      orientation="vertical"
      curveDirection="concave"
      grayscaleInactive
      itemWidth={340}
      aspectRatio={0.8}
      gap={-35}
      perspective={1100}
      bendAngle={48}
      depth={420}
      snap
      loop
      autoPlay
      autoPlayInterval={4000}
    />
  )
}

Props

PropTypeDefaultDescription
items(string · BendCarouselItem)[]bundled imagesCards as objects or image URL strings. Defaults to static imports from `./images/`.
imagesstring[]-Alias for a list of image URLs when not using `items`.
orientation"vertical" · "horizontal""vertical"Bend axis - vertical stack or horizontal rail.
curveDirection"concave" · "convex""concave"Curve away into the screen or forward toward the viewer.
itemWidthnumber320Card width in pixels. Height follows `aspectRatio`.
gapnumber-40Spacing between cards (negative for a shingle stack).
bendAnglenumber45Max bend rotation in degrees.
depthnumber400Z displacement for off-center cards.
autoPlaybooleanfalseAdvance automatically while mounted.
loopbooleantrueSeamless infinite looping.
grayscaleInactivebooleantrueDesaturate cards away from the center.
showControlsbooleantrueFloating prev / next / play controls.
showIndicatorsbooleantrueCounter and pagination dots.
classNamestring-Extra classes on the stage.