Photos streaming out of the center, developing like prints
| Name | Type | Default | Description |
|---|---|---|---|
items | { src: string; alt: string; title?: string; subtitle?: string; href?: string }[] | studio portrait collection | Photos streamed from the center, cycling through the collection in order. Images must allow cross-origin loading. Title and subtitle caption an opened photo. |
count | number | 18 | How many photos are in flight at once, up to 96. |
speed | number | 0.1 | How fast the photos travel outward. Negative values reverse the stream so photos sink into the center. |
rush | number | 0.35 | How the photos accelerate as they near the edges. 0 is an even, calm zoom; 1 is true perspective, where photos rush past at the end. |
spiral | number | 0 | How much the paths curl as photos travel outward. 0 flies them straight; negative values curl the other way. |
blankArea | number | 0.2 | Size of the empty center the photos emerge from, as a fraction of the half-diagonal. Room for a headline. |
size | number | 0.17 | Photo height, as a fraction of the shorter side, when a photo is halfway out. Photos grow as they travel. |
sizeVariance | number | 0.25 | How much photo sizes vary, for a sense of depth. |
aspect | number | 0.8 | Width divided by height of the photos in the stream. Images are cropped to fill. |
radius | number | 12 | Corner radius in pixels at the reference size. Smaller photos scale it down. |
border | number | 0 | Print border, as a fraction of the photo size. With a border, each photo develops on blank paper of the border color, like a darkroom print. |
borderColor | string | "#FFFFFF" | Color of the print border and paper. |
rim | number | 0.12 | Strength of the hairline edge highlight around each photo. |
roll | number | 0 | Maximum random tilt of each photo in degrees, like scattered prints. |
develop | number | 0.85 | How photos appear as they emerge. 0 fades them in; 1 develops them tone by tone, monochrome first, then in color. |
edgeFade | number | 0.35 | How softly photos dissolve into the background at the edges of the frame. |
shadow | number | 0.5 | Strength of the soft shadow under each photo. |
hoverSlow | number | 0.6 | How much the stream slows while the pointer is over it, so photos are easy to catch. |
catchOnHover | boolean | true | Hovering a photo catches it: it stops in place and lifts while the rest of the stream flows past. |
draggable | boolean | true | Drag to steer the stream. Pulling away from the center flies forward and pushing toward it flies back, while dragging around the center turns it. Both keep momentum. |
wheel | boolean | true | Scroll to fly through the stream. Set false to leave page scrolling untouched. |
captions | boolean | true | Show the title and subtitle under an opened photo. |
backgroundColor | string | "transparent" | Background of the component. Photos develop out of it, and captions adapt to it. |
paused | boolean | false | Stops the stream. Space toggles it too, and reduced-motion users get a still field that only moves on input. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
ariaLabel | string | "Contact sheet…" | Accessible description of the gallery and how to use it. |
onOpen | (item, index) => void | — | Called when a photo is opened by a click, Enter or the ref. |
onClose | () => void | — | Called when the opened photo returns to the stream. |
ref | { boost, open, close } | — | boost(amount) flies forward or back, open(index?) opens a photo, close() returns it. |
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 }[]Photos streamed from the center, cycling through the collection in order. Images must allow cross-origin loading. Title and subtitle caption an opened photo.
studio portrait collectioncountnumberHow many photos are in flight at once, up to 96.
18speednumberHow fast the photos travel outward. Negative values reverse the stream so photos sink into the center.
0.1rushnumberHow the photos accelerate as they near the edges. 0 is an even, calm zoom; 1 is true perspective, where photos rush past at the end.
0.35spiralnumberHow much the paths curl as photos travel outward. 0 flies them straight; negative values curl the other way.
0blankAreanumberSize of the empty center the photos emerge from, as a fraction of the half-diagonal. Room for a headline.
0.2sizenumberPhoto height, as a fraction of the shorter side, when a photo is halfway out. Photos grow as they travel.
0.17sizeVariancenumberHow much photo sizes vary, for a sense of depth.
0.25aspectnumberWidth divided by height of the photos in the stream. Images are cropped to fill.
0.8radiusnumberCorner radius in pixels at the reference size. Smaller photos scale it down.
12bordernumberPrint border, as a fraction of the photo size. With a border, each photo develops on blank paper of the border color, like a darkroom print.
0borderColorstringColor of the print border and paper.
"#FFFFFF"rimnumberStrength of the hairline edge highlight around each photo.
0.12rollnumberMaximum random tilt of each photo in degrees, like scattered prints.
0developnumberHow photos appear as they emerge. 0 fades them in; 1 develops them tone by tone, monochrome first, then in color.
0.85edgeFadenumberHow softly photos dissolve into the background at the edges of the frame.
0.35shadownumberStrength of the soft shadow under each photo.
0.5hoverSlownumberHow much the stream slows while the pointer is over it, so photos are easy to catch.
0.6catchOnHoverbooleanHovering a photo catches it: it stops in place and lifts while the rest of the stream flows past.
truedraggablebooleanDrag to steer the stream. Pulling away from the center flies forward and pushing toward it flies back, while dragging around the center turns it. Both keep momentum.
truewheelbooleanScroll to fly through the stream. Set false to leave page scrolling untouched.
truecaptionsbooleanShow the title and subtitle under an opened photo.
truebackgroundColorstringBackground of the component. Photos develop out of it, and captions adapt to it.
"transparent"pausedbooleanStops the stream. Space toggles it too, and reduced-motion users get a still field that only moves on input.
falsedprnumberMaximum device pixel ratio for the canvas.
2ariaLabelstringAccessible description of the gallery and how to use it.
"Contact sheet…"onOpen(item, index) => voidCalled when a photo is opened by a click, Enter or the ref.
—onClose() => voidCalled when the opened photo returns to the stream.
—ref{ boost, open, close }boost(amount) flies forward or back, open(index?) opens a photo, close() returns it.
—classNamestringClasses for the root element. It fills its parent, with a 420px minimum height.
—styleCSSPropertiesInline styles for the root element.
—