A ribbon of images winding through 3D space
| Name | Type | Default | Description |
|---|---|---|---|
items | { src: string; alt: string; title?: string; subtitle?: string }[] | Curated material studies | Images for the cards, repeated along the path in shuffled passes. Images must allow cross-origin loading. Title and subtitle caption a card when it is brought close. |
count | number | 72 | Number of cards along the path, up to 240. More cards make a longer path. |
path | "loop" | "knot" | "wave" | "loop" | Shape of the path: a figure-eight that passes over itself, a trefoil knot, or an undulating ring. |
tour | "cycle" | "ride" | "overview" | "cycle" | Camera behaviour: open on the whole path, dive in and pull back to reveal it every interval seconds; only ride; or show the whole path slowly turning. |
interval | number | 9 | Seconds of riding between pull-backs in the cycle tour. |
speed | number | 0.6 | Riding speed in cards per second. Negative values ride backwards. |
cardSize | number | 0.72 | Card height as a fraction of the spacing between cards. |
aspect | number | 1 | Card width divided by height. |
radius | number | 0.12 | Corner rounding, from 0 (square) to 1 (fully round). |
offset | number | 1 | How far beside and above the path the camera rides. Larger values give a wider view. |
fov | number | 60 | Vertical field of view in degrees. |
fog | number | 1 | How quickly cards fade into the background with distance. |
thread | number | 0.3 | Opacity of the fine line that runs through the cards along the path. 0 hides it. |
shadow | number | 0.5 | Opacity of the soft shadow beneath each card, most visible on light backgrounds. |
accentColor | string | "#B19EEF" | Colour of the fine thread that runs through the cards. |
backgroundColor | string | "transparent" | Background of the component. Cards fade into it with distance. |
focusOnClick | boolean | true | Clicking a card flies the camera to it and shows its caption. Click again or press Escape to ride on from there. |
holdToReveal | boolean | true | Press and hold to pull back and see the whole path. Drag while holding to turn it; release to dive back in. |
captions | boolean | true | Show the title and subtitle of the card brought close. |
interactive | boolean | true | Enable hover, clicking, holding and dragging. |
draggable | boolean | true | Drag to travel along the path with inertia: vertically with a mouse, sideways on touch. |
wheel | boolean | true | Scroll to travel along the path; scrolling during a close-up or a pull-back dives back in. Set false to leave page scrolling untouched. |
pauseOnHover | boolean | true | Stop riding while the pointer rests on a card, which lifts slightly so it can be clicked. |
seed | number | 0 | Changes the order in which images appear along the path. |
paused | boolean | false | Stops riding and the tour. Reduced-motion users always get this. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
ariaLabel | string | "Depth ribbon gallery…" | Accessible description of the gallery and how to use it. |
onFocusChange | (item, index) => void | — | Called when a card is brought close, with null and -1 when the ride resumes. |
ref | { travel, focus, release, reveal } | — | Imperative controls: push the camera along by a number of cards, bring a card close, resume, or show the whole path. |
children | ReactNode | — | Content centred over the gallery, such as a headline. It fades out while a card is close. |
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 }[]Images for the cards, repeated along the path in shuffled passes. Images must allow cross-origin loading. Title and subtitle caption a card when it is brought close.
Curated material studiescountnumberNumber of cards along the path, up to 240. More cards make a longer path.
72path"loop" | "knot" | "wave"Shape of the path: a figure-eight that passes over itself, a trefoil knot, or an undulating ring.
"loop"tour"cycle" | "ride" | "overview"Camera behaviour: open on the whole path, dive in and pull back to reveal it every interval seconds; only ride; or show the whole path slowly turning.
"cycle"intervalnumberSeconds of riding between pull-backs in the cycle tour.
9speednumberRiding speed in cards per second. Negative values ride backwards.
0.6cardSizenumberCard height as a fraction of the spacing between cards.
0.72aspectnumberCard width divided by height.
1radiusnumberCorner rounding, from 0 (square) to 1 (fully round).
0.12offsetnumberHow far beside and above the path the camera rides. Larger values give a wider view.
1fovnumberVertical field of view in degrees.
60fognumberHow quickly cards fade into the background with distance.
1threadnumberOpacity of the fine line that runs through the cards along the path. 0 hides it.
0.3shadownumberOpacity of the soft shadow beneath each card, most visible on light backgrounds.
0.5accentColorstringColour of the fine thread that runs through the cards.
"#B19EEF"backgroundColorstringBackground of the component. Cards fade into it with distance.
"transparent"focusOnClickbooleanClicking a card flies the camera to it and shows its caption. Click again or press Escape to ride on from there.
trueholdToRevealbooleanPress and hold to pull back and see the whole path. Drag while holding to turn it; release to dive back in.
truecaptionsbooleanShow the title and subtitle of the card brought close.
trueinteractivebooleanEnable hover, clicking, holding and dragging.
truedraggablebooleanDrag to travel along the path with inertia: vertically with a mouse, sideways on touch.
truewheelbooleanScroll to travel along the path; scrolling during a close-up or a pull-back dives back in. Set false to leave page scrolling untouched.
truepauseOnHoverbooleanStop riding while the pointer rests on a card, which lifts slightly so it can be clicked.
trueseednumberChanges the order in which images appear along the path.
0pausedbooleanStops riding and the tour. Reduced-motion users always get this.
falsedprnumberMaximum device pixel ratio for the canvas.
2ariaLabelstringAccessible description of the gallery and how to use it.
"Depth ribbon gallery…"onFocusChange(item, index) => voidCalled when a card is brought close, with null and -1 when the ride resumes.
—ref{ travel, focus, release, reveal }Imperative controls: push the camera along by a number of cards, bring a card close, resume, or show the whole path.
—childrenReactNodeContent centred over the gallery, such as a headline. It fades out while a card is close.
—classNamestringClasses for the root element. It fills its parent, with a 420px minimum height.
—styleCSSPropertiesInline styles for the root element.
—