A gallery wall that curves around the viewer
| Name | Type | Default | Description |
|---|---|---|---|
items | { src: string; alt: string; title?: string; subtitle?: string; href?: string }[] | Curated material studies | Images hung around the wall, in order. Images must allow cross-origin loading. Title and subtitle caption the centred image; href makes clicking it navigate. |
startIndex | number | 0 | Index of the image that starts in the centre. |
aspect | number | 1.25 | Width divided by height of every panel. Images are cropped to fill it. |
size | number | 0.46 | Height of the centred panel as a fraction of the space above the caption. |
curvature | number | 0.72 | How strongly the wall bends around the viewer, from 0 (a flat strip) to 1 (a tight drum). |
distance | number | 4 | How far the viewer stands from the wall, in panel heights. Closer exaggerates the perspective; further flattens it. |
tilt | number | 0 | Viewing angle in degrees. Negative looks up at the wall from below, positive looks down onto the floor. |
gap | number | 16 | Space between panels in pixels, measured at the centred panel. |
radius | number | 14 | Corner radius in pixels, measured at the centred panel. |
reflection | number | 0.06 | Strength of the faint reflection on the floor below the wall. 0 removes it. |
dim | number | 0.35 | How much the wall fades into the background toward the left and right edges. |
autoplay | "drift" | "step" | "off" | "drift" | Drift turns the wall slowly and continuously, step turns it one panel every interval, off leaves it still. |
speed | number | 0.16 | Drift speed in panels per second. Negative values turn the other way, also for step. |
interval | number | 4 | Seconds between steps when autoplay is step. |
snap | boolean | true | Settle with a panel centred after a drag, flick or scroll, like a dial with detents. |
inertia | number | 0.5 | How far a flick carries the wall before it settles, from 0 to 1. |
pauseOnHover | boolean | true | Brake the motion while the pointer rests on the wall, so a picture can be looked at. |
draggable | boolean | true | Grab the wall and turn it. The point you hold stays under the pointer, and flicks carry on with momentum. |
wheel | boolean | true | Scroll to turn the wall, one panel per notch. Set false to leave page scrolling untouched. |
captions | boolean | true | Show the title and subtitle of the centred image below the wall. |
controls | boolean | true | Show previous and next buttons with a counter. |
backgroundColor | string | "transparent" | Background of the component. Caption, controls and loading panels adapt to it. |
paused | boolean | false | Stops autoplay. Space toggles it too, and reduced-motion users get a still wall that only moves on input. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
ariaLabel | string | "Concave carousel…" | Accessible description of the carousel and how to use it. |
onIndexChange | (index) => void | — | Called when a different image reaches the centre. |
onSelect | (item, index) => void | — | Called when the centred image is clicked or Enter is pressed. Clicking any other image turns the wall to it. |
ref | { next, previous, goTo } | — | Imperative controls for turning the wall. |
className | string | — | Classes for the root element. It fills its parent, with a 420px minimum height. |
style | CSSProperties | — | Inline styles for the root element. |
items{ src: string; alt: string; title?: string; subtitle?: string; href?: string }[]Images hung around the wall, in order. Images must allow cross-origin loading. Title and subtitle caption the centred image; href makes clicking it navigate.
Curated material studiesstartIndexnumberIndex of the image that starts in the centre.
0aspectnumberWidth divided by height of every panel. Images are cropped to fill it.
1.25sizenumberHeight of the centred panel as a fraction of the space above the caption.
0.46curvaturenumberHow strongly the wall bends around the viewer, from 0 (a flat strip) to 1 (a tight drum).
0.72distancenumberHow far the viewer stands from the wall, in panel heights. Closer exaggerates the perspective; further flattens it.
4tiltnumberViewing angle in degrees. Negative looks up at the wall from below, positive looks down onto the floor.
0gapnumberSpace between panels in pixels, measured at the centred panel.
16radiusnumberCorner radius in pixels, measured at the centred panel.
14reflectionnumberStrength of the faint reflection on the floor below the wall. 0 removes it.
0.06dimnumberHow much the wall fades into the background toward the left and right edges.
0.35autoplay"drift" | "step" | "off"Drift turns the wall slowly and continuously, step turns it one panel every interval, off leaves it still.
"drift"speednumberDrift speed in panels per second. Negative values turn the other way, also for step.
0.16intervalnumberSeconds between steps when autoplay is step.
4snapbooleanSettle with a panel centred after a drag, flick or scroll, like a dial with detents.
trueinertianumberHow far a flick carries the wall before it settles, from 0 to 1.
0.5pauseOnHoverbooleanBrake the motion while the pointer rests on the wall, so a picture can be looked at.
truedraggablebooleanGrab the wall and turn it. The point you hold stays under the pointer, and flicks carry on with momentum.
truewheelbooleanScroll to turn the wall, one panel per notch. Set false to leave page scrolling untouched.
truecaptionsbooleanShow the title and subtitle of the centred image below the wall.
truecontrolsbooleanShow previous and next buttons with a counter.
truebackgroundColorstringBackground of the component. Caption, controls and loading panels adapt to it.
"transparent"pausedbooleanStops autoplay. Space toggles it too, and reduced-motion users get a still wall that only moves on input.
falsedprnumberMaximum device pixel ratio for the canvas.
2ariaLabelstringAccessible description of the carousel and how to use it.
"Concave carousel…"onIndexChange(index) => voidCalled when a different image reaches the centre.
—onSelect(item, index) => voidCalled when the centred image is clicked or Enter is pressed. Clicking any other image turns the wall to it.
—ref{ next, previous, goTo }Imperative controls for turning the wall.
—classNamestringClasses for the root element. It fills its parent, with a 420px minimum height.
—styleCSSPropertiesInline styles for the root element.
—