Skip to content
PixiKit

Aperture Gallery

An oval of photo cards that closes into a camera iris: the cards lean into overlapping blades around a round opening, and a clicked photo fills that opening.

pixikit.com/docs/components/aperture-gallery

Customize

Preset
Count28
Mode
Interval6.0s
Hold4.0s
Morph duration1.8s
Stagger0.70
Speed6°/s
Fin60°
Pupil0.52
Card aspect0.78
Radius0.18
Gap0.10
Depth1.00
Shade0.60
Background color
Focus on click
Captions
Draggable
Wheel
Pause on hover
Paused

Props

31
NameTypeDefaultDescription
itemsApertureGalleryItem[]DEFAULT_ITEMSThe photos; they repeat until count is filled.
preset"iris" | "aperture" | "gallery" | "bloom" | "pulse" | "still""iris"A named setup. Values you leave at their defaults follow it.
countnumber28How many cards are in the ring.
mode"cycle" | "gallery" | "iris""cycle"'gallery' keeps the oval, 'iris' keeps the closed ring, 'cycle' alternates.
intervalnumber6Seconds the oval is shown in the cycle.
holdnumber4Seconds the iris is held in the cycle.
morphDurationnumber1.8Seconds one card takes to move between the two shapes.
staggernumber0.7How far the cards are spread in time during a change; 0 moves them together.
speednumber6Turning speed in degrees per second; negative turns the other way.
finnumber60Lean of the blades in the iris, in degrees.
pupilnumber0.52Size of the opening, as a share of the ring.
cardAspectnumber0.78Card width divided by height.
radiusnumber0.18Corner rounding, as a share of the card.
gapnumber0.1Space between cards in the oval, as a share of the card.
depthnumber1How far the blades tilt out of the page in the iris.
shadenumber0.6How dark the shaded side of a blade gets.
backgroundColorstring"transparent"Color behind the cards.
focusOnClickbooleantrueClicking a card flies its photo into the opening while the ring closes around it. Click again or press Escape to put it back.
captionsbooleantrueShows the title and subtitle of the focused photo.
draggablebooleantrueDrag around the ring to turn it, with inertia.
wheelbooleantrueScroll to turn the ring, one card per notch. Set false to leave page scrolling untouched.
pauseOnHoverbooleantrueStops the ring and the cycle while the pointer rests on a card.
pausedbooleanfalseFreezes the turning and the cycle.
dprnumber2Kept for parity with canvas galleries; this one is drawn by the browser at its own pixel ratio.
ariaLabelstring"Photo ring"Label announced for the gallery.
onFocusChange(item: ApertureGalleryItem | null, index: number) => voidNoneCalled when a photo gains or loses focus.
onStateChange(state: ApertureGalleryState) => voidNoneCalled when the ring settles into the oval or the iris.
refRef<ApertureGalleryHandle>NoneHandle with open, close, setState and rotate.
childrenReactNodeNoneContent shown in the middle of the ring.
classNamestringNone
styleCSSPropertiesNone

Related