A dock of photo slices that swell open into full images
| Name | Type | Default | Description |
|---|---|---|---|
items | { src: string; alt: string; title?: string; subtitle?: string; focus?: number }[] | built-in scene collection | Photos in the reel, in order. Images must allow cross-origin loading. Title labels a bar and captions the open photo; focus (0 to 1) picks which vertical slice a narrow bar shows. |
defaultOpen | number | -1 | Index of a photo to open once the reel has loaded. -1 starts closed. |
barWidth | number | 44 | Width of a bar at rest in pixels. Bars narrow automatically to fit the container. |
barHeight | number | 0.5 | Height of a bar at rest, as a fraction of the component height. |
gap | number | 10 | Space between bars in pixels. |
radius | number | 12 | Corner radius in pixels. Narrow bars cap it at half their width. |
magnify | number | 2.4 | How much wider the bar under the pointer grows. 1 turns magnification off. |
lift | number | 1.15 | How much taller the bar under the pointer grows. |
influence | number | 200 | Distance in pixels over which bars around the pointer magnify. |
align | "center" | "bottom" | "center" | Grow bars around their middle, or upward from a shared baseline like a dock. |
openSize | number | 0.72 | Height of an open photo, as a fraction of the space above its caption. |
openAspect | number | 1 | Width divided by height of an open photo. 0 opens each photo at its own proportions. |
elasticity | number | 0.35 | How springy the motion is, from 0 (smooth and exact) to 1 (bouncy, with a slight wobble as bars settle). |
blur | number | 0.5 | How much the other bars blur while a photo is open. Hovering one sharpens it again. |
dim | number | 0.45 | How much the other bars fade into the background while a photo is open. |
shadow | number | 0.35 | Strength of the soft shadow under each bar. |
rim | number | 0.12 | Strength of the hairline edge highlight around each bar. |
autoplay | "sweep" | "cycle" | "off" | "sweep" | Sweep glides a magnifying focus back and forth across the reel while it is idle; cycle opens each photo in turn every interval. |
speed | number | 1.4 | Sweep speed in bars per second. |
interval | number | 4 | Seconds between photos when autoplay is cycle. |
pauseOnHover | boolean | true | Pause autoplay while the pointer is over the reel. |
draggable | boolean | true | Drag along the reel to move the magnification (the touch equivalent of hovering). With a photo open, swipe it sideways to move to the next one. |
wheel | boolean | true | Scroll to move the magnification one bar per notch, or between open photos. Set false to leave page scrolling untouched. |
captions | boolean | true | Show the title and subtitle under an open photo. |
labels | boolean | true | Show the title of the bar under the pointer, below the reel. |
backgroundColor | string | "transparent" | Background of the component. Text, shadows and dimmed bars adapt to it. |
paused | boolean | false | Stops autoplay. Reduced-motion users get instant transitions and no autoplay. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
ariaLabel | string | "Elastic reel…" | Accessible description of the reel and how to use it. |
onOpen | (item, index) => void | — | Called when a photo opens, by click, tap, keyboard, wheel, swipe or autoplay. |
onClose | () => void | — | Called when the open photo closes. |
ref | { open, close, next, previous } | — | open(index) opens a photo, close() closes it, next() and previous() step through the reel. |
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; focus?: number }[]Photos in the reel, in order. Images must allow cross-origin loading. Title labels a bar and captions the open photo; focus (0 to 1) picks which vertical slice a narrow bar shows.
built-in scene collectiondefaultOpennumberIndex of a photo to open once the reel has loaded. -1 starts closed.
-1barWidthnumberWidth of a bar at rest in pixels. Bars narrow automatically to fit the container.
44barHeightnumberHeight of a bar at rest, as a fraction of the component height.
0.5gapnumberSpace between bars in pixels.
10radiusnumberCorner radius in pixels. Narrow bars cap it at half their width.
12magnifynumberHow much wider the bar under the pointer grows. 1 turns magnification off.
2.4liftnumberHow much taller the bar under the pointer grows.
1.15influencenumberDistance in pixels over which bars around the pointer magnify.
200align"center" | "bottom"Grow bars around their middle, or upward from a shared baseline like a dock.
"center"openSizenumberHeight of an open photo, as a fraction of the space above its caption.
0.72openAspectnumberWidth divided by height of an open photo. 0 opens each photo at its own proportions.
1elasticitynumberHow springy the motion is, from 0 (smooth and exact) to 1 (bouncy, with a slight wobble as bars settle).
0.35blurnumberHow much the other bars blur while a photo is open. Hovering one sharpens it again.
0.5dimnumberHow much the other bars fade into the background while a photo is open.
0.45shadownumberStrength of the soft shadow under each bar.
0.35rimnumberStrength of the hairline edge highlight around each bar.
0.12autoplay"sweep" | "cycle" | "off"Sweep glides a magnifying focus back and forth across the reel while it is idle; cycle opens each photo in turn every interval.
"sweep"speednumberSweep speed in bars per second.
1.4intervalnumberSeconds between photos when autoplay is cycle.
4pauseOnHoverbooleanPause autoplay while the pointer is over the reel.
truedraggablebooleanDrag along the reel to move the magnification (the touch equivalent of hovering). With a photo open, swipe it sideways to move to the next one.
truewheelbooleanScroll to move the magnification one bar per notch, or between open photos. Set false to leave page scrolling untouched.
truecaptionsbooleanShow the title and subtitle under an open photo.
truelabelsbooleanShow the title of the bar under the pointer, below the reel.
truebackgroundColorstringBackground of the component. Text, shadows and dimmed bars adapt to it.
"transparent"pausedbooleanStops autoplay. Reduced-motion users get instant transitions and no autoplay.
falsedprnumberMaximum device pixel ratio for the canvas.
2ariaLabelstringAccessible description of the reel and how to use it.
"Elastic reel…"onOpen(item, index) => voidCalled when a photo opens, by click, tap, keyboard, wheel, swipe or autoplay.
—onClose() => voidCalled when the open photo closes.
—ref{ open, close, next, previous }open(index) opens a photo, close() closes it, next() and previous() step through the reel.
—classNamestringClasses for the root element. It fills its parent, with a 420px minimum height.
—styleCSSPropertiesInline styles for the root element.
—