Curved Gallery
A ring of images you can drag, flick and spin.
Features
- •Curved 3D ring — Images sit on a ring that bends towards the viewer, with side images gently shaded. Curve, tilt and perspective are all adjustable, down to a flat row.
- •Drag, flick and settle — Drag or swipe with real momentum, use a trackpad sideways, and it glides to rest on the nearest image before drifting on.
- •Same view on every screen — Below 720px the images, gaps and depth shrink together, so phones see the same curved composition as desktop.
- •Endless loop — Any number of images loops seamlessly; a short list is repeated so the ring always looks full.
- •Keyboard and accessibility — Arrow keys step one image at a time and Space pauses. It's a labelled carousel, honours reduced motion and stops working while offscreen.
- •Smooth by design — Animated outside React on the GPU with transforms only, so it stays fluid even with many images.
Props API Reference
17 configurable props| Prop | Type | Default | Description |
|---|---|---|---|
| items | { image, alt?, href? }[] | 5 placeholders | Images in order; an href makes the image a link. Until you pass items, numbered placeholder cards show so you can see the effect. |
| cardWidth | number | 180 | Image width in px; the whole scene scales down below 720px. |
| aspectRatio | number | 0.8 | Width ÷ height, e.g. 0.8 portrait, 1 square. |
| gap | number | 28 | Space between images, in px. |
| radius | number | 0 | Corner radius in px. |
| curve | number | 24 | Degrees each image turns from its neighbour; 0 is a flat row. |
| tilt | number | 0 | Tips the ring towards or away from the viewer, in degrees. |
| perspective | number | 700 | Camera distance in px; lower is more dramatic. |
| autoplay | boolean | true | Keep drifting by itself. |
| speed | number | 0.16 | Images per second while drifting. |
| direction | "left" | "right" | "left" | Drift direction. |
| pauseOnHover | boolean | true | Ease to a stop on the nearest image while hovered. |
| draggable | boolean | true | Drag, swipe and trackpad scrolling. |
| tone | "color" | "mono" | "color" | Mono shows the images in black and white. |
| dimSides | number | 0.35 | How much images darken as they turn away (0–1). |
| ariaLabel | string | "Gallery" | Accessible name for the carousel. |
| className / style | string / CSSProperties | undefined | Root element; it fills its parent. |