← Components

3D Card Ring

Pro

Photo cards bent around a 3D cylinder that spins with wheel and drag.

Gallery · ProInstall ↓
Open preview ↗
Loading the demoNew tab ↗

Customize

600 px
260 px
360 px
10.0 °
-10.0 °
4.0 °
1200 px
0.40
0.60 rad/s
1.0
0.950
#0b0b0b
#f26e33
Your code
<CardRing3d images={images} />

Changes show live and stay in the address, so a link keeps them.

Code

This one is a Pro component

Pro components come with Pro Components, any Templates plan or All-Access. Sign in, or enter your licence key, to see the code here and copy it, or install it with the shadcn CLI below.

Install

With the shadcn CLI

Pro components install from a private registry that checks your licence key (Pro Components, a Templates plan or All-Access). Set it up once per project. The key stays in an environment variable and never goes into components.json.

1. Add the registry

Merge this into components.json.

components.json
{
  "registries": {
    "@dimaac-pro": {
      "url": "https://api.dimaac.com/v1/ui/r/{name}.json",
      "headers": { "Authorization": "Bearer ${DIMAAC_LICENSE_KEY}" }
    }
  }
}

2. Add your key

Put it in .env.local (or your shell) and keep that file out of git. The CLI fills in ${DIMAAC_LICENSE_KEY} from it.

.env.local
DIMAAC_LICENSE_KEY=your-licence-key

3. Add the component

npx shadcn@latest add @dimaac-pro/card-ring-3d

@dimaac-pro is the registry from step 1. More in Docs

By hand

# Nothing to install: it only needs React
  1. It needs nothing but React 19.
  2. Copy the component file from the Code panel (once your licence key unlocks it) into components/dimaac/card-ring-3d.tsx.
  3. It's styled with Tailwind v4 classes. If that folder sits outside the places Tailwind scans, add it with @source in your CSS.
  4. Import it with import { CardRing3d } from "@/components/dimaac/card-ring-3d" and give its parent a size: it fills it.

Props

PropTypeDefaultDescription
images (required)(string | CardRingItem)[]-The cards, as photo URLs or items with a title. 8 to 16 photos of the same shape look best.
radiusnumber600Radius of the cylinder, in pixels (before it is scaled down to fit a small box).
cardWidthnumber260Width of each card along the ring, in pixels. Cards shrink if they don't fit around it.
cardHeightnumber360Height of each card, in pixels.
tiltnumber10How far the camera looks down on the ring, in degrees. 0 is side on.
rollnumber-10How far the whole ring leans to one side, in degrees.
swaynumber4How far the lean sways back and forth by itself, in degrees. 0 keeps it still.
speednumber1How strongly wheel and drag spin the ring. 1 means a dragged card follows the pointer.
autoRotatenumber0.6How fast the ring turns by itself, in radians a second. 0 stops it when the spin runs out.
frictionnumber0.95How much of a spin is kept each frame (at 60 frames a second). Higher glides longer.
perspectivenumber1200Distance from the camera to the front cards, in pixels. Smaller is a stronger 3D effect.
fognumber0.4How much the far side fades into the fog colour. 0 is no fog.
fogColorstring"#ebe7e1"The colour far cards fade into. Match the background. Any CSS colour, CSS variables too.
backColorstring"#d8d4ce"The colour of the cards' backs, seen on the far side. Any CSS colour, CSS variables too.
cardColorstring"#0b0b0b"The card's frame and label background. A plain canvas colour (hex, rgb or hsl).
textColorstring""The title's colour. A plain canvas colour. Empty picks white or near-black to suit the card colour.
accentColorstring"#f26e33"The subtitle's colour. A plain canvas colour.
fontFamilystring"Syne, sans-serif"The labels' font, e.g. "Syne, sans-serif". Load the font on the page yourself.
shadowbooleantrueA soft shadow under the ring.
wheelbooleantrueSpin the ring with the mouse wheel or trackpad (the page doesn't scroll over it then).
labelstring"Gallery"What screen readers call the ring.
classNamestring""Extra classes for the outer box. Give it a size (it fills it).

Use with AI

Agent prompt

Paste it into Claude Code, Cursor or any coding agent, or open it straight in a chat. It carries your Customize settings.

Prompt
Add the 3D Card Ring component (<CardRing3d />) from DiMaac UI to this project. It is a Pro component, so its source needs the owner's DiMaac licence key (Pro Components, a Templates plan or All-Access).

Docs: https://ui.dimaac.com/components/card-ring-3d

1. Add the Pro registry to components.json (merge it into "registries"). Don't write the key into the file:
{
  "registries": {
    "@dimaac-pro": {
      "url": "https://api.dimaac.com/v1/ui/r/{name}.json",
      "headers": { "Authorization": "Bearer ${DIMAAC_LICENSE_KEY}" }
    }
  }
}

2. The owner puts their licence key in .env.local (keep it out of git): DIMAAC_LICENSE_KEY=your-licence-key
   Ask them for it if it isn't set. Never print it or commit it.

3. Install it with:
npx shadcn@latest add @dimaac-pro/card-ring-3d

The registry item is https://api.dimaac.com/v1/ui/r/card-ring-3d.json and wants the header "Authorization: Bearer <licence key>".

Then use it like this:
import { CardRing3d } from "@/components/dimaac/card-ring-3d";
<CardRing3d images={images} />

It uses Tailwind v4 classes, so make sure Tailwind scans that folder.
Give its parent a size, keep light and dark mode working and keep its prefers-reduced-motion fallback.
Full index for agents: https://ui.dimaac.com/llms.txt

Files agents read

llms.txt
Every component and how to install it
card-ring-3d.md
This page as Markdown: install, props and the full source

About

A ring of photo cards wrapped around a cylinder, drawn on a single 2D canvas with no 3D library. Every card is cut into thin slices that are placed on the cylinder, tilted toward the camera and put in perspective, so the cards really curve; the far side shows their backs and fades into a fog colour that can follow your theme through CSS variables. It turns slowly by itself and whips in when the photos arrive; wheel, drag, touch and the arrow keys spin it, and the spin glides back to the slow turn. The canvas is sharp on retina screens, fits itself to any box, pauses off screen, and stays still (but can still be turned by hand) when the visitor prefers reduced motion.

Installs to
components/dimaac/card-ring-3d.tsx
Uses
React only
Tags
canvas, 3d, gallery, carousel, drag, wheel

Portrait by studiomiklus, Lloyd Creates, West Kast, SHIHO, Benginur Hajjaj, Shaun Duval, Dynamic Wang, Amino, Edita and Steph Meade on Lummi (Lummi License).