WebberUI

3d Image Ring

A 3D image gallery projected as a ring / hemisphere that can be dragged to rotate, auto-rotates, and keeps its momentum.

This is a WebberUI Pro component

Free during the launch campaign: sign up or sign in, then hit “Copy install command” in the preview above and it installs straight away — no payment, no credit card. The command below returns 401 while you are signed out.

How to install Pro components →See the plans →

A set of images arranged at equal angles into a three-dimensional drum: drag with the pointer to rotate it, release and the momentum carries on, with automatic rotation and depth dimming for the panels facing away. Implemented with pure CSS 3D transforms, with no dependency on WebGL.

Loading preview…
npx shadcn@latest add "https://webberui.com/r/3d-image-ring.json?t=<install token>"

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

1600
8
10
0.72
<3dImageRing />

Installation

npx shadcn@latest add "https://webberui.com/r/3d-image-ring.json?t=<install token>"

Or, once registries are configured in components.json, install it as @webberui/3d-image-ring.

Usage

The content of each entry in items can be any node — an image, a card, or a gradient. The example below uses gradients as stand-in images:

import { ThreeDImageRing } from "@/components/ui/3d-image-ring";

const items = Array.from({ length: 8 }, (_, i) => ({
  id: i,
  label: `Slide ${i + 1}`,
  content: (
    <div
      className="h-full w-full"
      style={{ background: "linear-gradient(150deg, #6366f1, #22d3ee)" }}
    />
  ),
}));

<ThreeDImageRing items={items} itemWidth={180} itemHeight={240} />;

Props

PropTypeDefaultDescription
itemsThreeDImageRingItem[]Panels on the ring, each with id, content, and label
itemWidthnumber200Panel width (px)
itemHeightnumber260Panel height (px)
radiusnumberautomaticRing radius (px); computed from the panel width and count when omitted
perspectivenumber1600CSS perspective distance (px); smaller values exaggerate the perspective
tiltnumber8Stage tilt angle (deg), giving a hemispherical look from above
autoRotatebooleantrueWhether to rotate automatically
autoRotateSpeednumber10Automatic rotation speed (degrees/second)
dragSensitivitynumber0.3Drag sensitivity (degrees/px)
inertiabooleantrueWhether momentum is kept after a flick is released
pauseOnHoverbooleantruePause the automatic rotation while the pointer hovers
backDimnumber0.72Maximum dimming applied to panels facing away (01)
itemClassNamestringExtra classes for each panel container (rounded corners, and so on)
ariaLabelstring"3D 影像環"Accessible label for the whole ring (the built-in default is Traditional Chinese — pass this prop to name it in your own language)

Accessibility

  • When the user has "reduce motion" enabled at the system level, it presents as a static, horizontally scrollable row of images, with no 3D and no dragging
  • Keyboard supported: once focused, the left and right arrow keys rotate it one panel at a time
  • Each panel can provide an accessible description through label

On this page