Circular Gallery
A cinematic 3D carousel of curved media panels orbiting on a themed stage, with drag, momentum, wheel, and click-through.
Installation#
pnpm dlx shadcn@latest add @davinciui/circular-galleryUsage#
Panels support images or muted, looping video. Add an optional href to make a panel a link. Every item should include meaningful alternative text.
API Reference#
| Prop | Type | Default |
|---|---|---|
itemsImages or videos arranged around the ring. | CircularGalleryItem[] | — |
panelWidthAngular fill of each 360 / N slot. | number | 0.92 |
panelHeightPanel height relative to the orbit radius. | number | 1.45 |
cornerRadiusRounded-corner radius relative to the panel height. | number | 0 |
orbitRadiusRing radius in world units. | number | 1 |
perspectiveVertical field of view and camera distance. | { fov?: number; distance?: number } | number | { fov: 20.4, distance: 5.5 } |
viewOffsetVertical offset of the ring. | number | 0 |
ringTiltRing tilt around the view axis in degrees. | number | 0 |
depthShadingDarken panels based on distance from the camera. | boolean | true |
shadeStrengthMaximum darkening applied to the far side. | number | 0.4 |
reflectionRender a faded mirror of the ring beneath it. | boolean | false |
reflectionOpacityOpacity of the reflection. | number | 0.25 |
autoSpinRotate the ring while idle. | boolean | true |
spinSpeedIdle rotation speed in degrees per second. | number | 9 |
pauseOnHoverPause idle rotation while a panel is hovered. | boolean | false |
motionSmoothingMotion smoothing constant. Higher is snappier. | number | 8 |
dragRotationAllow the ring to be dragged. | boolean | true |
dragMultiplierMultiplier applied to drag movement. | number | 1 |
releaseMomentumToggle or scale release momentum. | boolean | number | true |
alignmentHorizontal alignment of the ring. | "center" | "left" | "right" | "center" |
wheelRotationAllow rotation with the mouse wheel / trackpad. | boolean | true |
interactiveEnable drag, wheel, hover, and link interactions. | boolean | true |
ariaLabelAccessible name for the gallery region. | string | "Circular image gallery" |
classNameAdditional classes for the stage. | string | — |
Accessibility#
A labeled region contains an aria-hidden WebGL canvas and a visually hidden list of links that repeats every alt text. Each link is keyboard focusable, focuses its panel to the front, and ArrowLeft or ArrowRight rotates the ring. Panels without an href remain focusable text-only links.
Motion#
Idle rotation runs at spinSpeed with exponential smoothing, pausing off-screen, in hidden tabs, and on hover when pauseOnHover is set. Drag and wheel update the target angle, release momentum decays at 0.95 per 60fps frame, and prefers-reduced-motion stops idle spin while leaving drag and wheel available.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

