Ring Gallery

Ring Gallery

A 3D carousel ring — cards stand on an invisible cylinder; drag to spin it with real inertia, let go and it coasts, idle and it slowly revolves.

Installation

▸ Run the following command

npx shadcn@latest add https://www.mellowui.com/r/ring-gallery.json

▸ Or install manually

  1. Install dependencies: pnpm add motion
  2. Copy the source from the Code tab above.
  3. Place it at components/mellow/ring-gallery.tsx
  4. Import and use.

API Reference

PropTypeDefaultDescription
itemsReactNode[]Card faces standing on the ring.
cardWidthnumber210Card size in px.
cardHeightnumber270Card height in px.
gapnumber48Extra ring radius beyond the minimum, in px.
autoRotatenumber5Idle rotation in deg/s — pauses on hover and drag. 0 disables.
segmentsnumber10Vertical slices each card is bent into. 1 renders flat cards.
classNamestringAdditional CSS classes.