Skip to content
PixiKit

Formation Gallery

Photo cards that flow between rings, a spiral, a globe and a loose field: the group turns slowly, cards gather or swirl into the next shape, and a click opens one in the centre.

pixikit.com/docs/components/formation-gallery

Customize

Preset
Count56
Formation
Interval6.0s
Autoplay
Transition
Rings3
Card size0px
Clearance0.36
Spin1.00
Shape
Radius0.24
Depth0.00
Hover scale1.20×
Shadow0.60
Accent color
Background color
Open on click
Captions
Interactive
Draggable
Pause on hover
Seed0
Paused

Props

34
NameTypeDefaultDescription
itemsFormationGalleryItem[]DEFAULT_ITEMSThe photos; they repeat until count is filled.
preset"community" | "orbits" | "globe" | "galaxy" | "drift" | "showreel""community"A named setup. Values you leave at their defaults follow it.
countnumber56How many cards are shown.
formationsFormationName[]ALLThe formations the gallery moves through, in order.
formation"cycle" | FormationName"cycle"Shows one formation only; 'cycle' moves through the formations list.
intervalnumber6Seconds each formation is held.
autoplaybooleantrueMoves through the formations on a timer. The arrow keys and the ref still work when it is off.
transition"gather" | "swirl" | "direct""gather"How cards travel between formations.
ringsnumber3Number of rings in the orbits formation.
cardSizenumber0Card size in pixels. 0 sizes the cards to fit the count.
clearancenumber0.36Size of the empty middle, as a share of the formation.
spinnumber1Rotation speed; negative turns the other way.
shape"auto" | "square" | "rounded" | "circle""auto"Card shape. 'auto' picks one per formation.
radiusnumber0.24Corner rounding of rounded cards, as a share of the card size.
depthnumber0How far the whole group tilts toward the pointer. 0 keeps it flat.
hoverScalenumber1.2Scale of the card under the pointer. It holds still so it can be clicked.
shadownumber0.6Strength of the shadow under the cards.
accentColorstring"#B19EEF"Color of the thin ring around the card under the pointer.
backgroundColorstring"transparent"Color behind the cards.
openOnClickbooleantrueClicking a card enlarges it in the centre. Click again or press Escape to put it back.
captionsbooleantrueShows the title and subtitle of the opened card.
interactivebooleantrueEnables tilt, hover and clicking.
draggablebooleantrueDragging spins the formation, with inertia.
pauseOnHoverbooleantrueStops the rotation and holds the formation while the pointer is on a card.
seednumber0Changes the random placement.
pausedbooleanfalseFreezes rotation and the timer.
dprnumber2Kept for parity with canvas galleries; this one is drawn by the browser at its own pixel ratio.
ariaLabelstring"Photo formation"Label announced for the gallery.
onFormationChange(formation: FormationName, index: number) => voidNoneCalled when the formation changes.
onOpen(item: FormationGalleryItem, index: number) => voidNoneCalled when a card is opened.
refRef<FormationGalleryHandle>NoneHandle with next, previous, setFormation and close.
childrenReactNodeNoneContent shown in the empty middle.
classNamestringNone
styleCSSPropertiesNone

Related