Skip to content
PixiKit

Spiral Gallery

Photos flowing along a spiral that grows from the centre: each one scales with its distance, the dial winds by drag or scroll, and a click brings a photo upright to the middle.

pixikit.com/docs/components/spiral-gallery

Customize

Preset
Arms1
Per turn18
Pitch7.0°
Center density1.30
Center fade0.50
Card size0.28
Roundness0.22
Tilt1.00
Rotation0°
Direction
Speed0.35
Center x0.50
Center y0.50
Shadow0.50
Background color
Open on click
Captions
Draggable
Wheel
Pause on hover
Interactive
Paused

Props

31
NameTypeDefaultDescription
itemsSpiralGalleryItem[]DEFAULT_ITEMSThe photos; they repeat along the spiral.
preset"spiral" | "circles" | "shell" | "galaxy" | "tunnel" | "upright""spiral"A named setup. Values you leave at their defaults follow it.
armsnumber1Number of spiral arms.
perTurnnumber18Photos in one full turn of an arm.
pitchnumber7How fast the spiral opens, in degrees; small values wind tightly.
centerDensitynumber1.3How far the spiral keeps winding into the centre.
centerFadenumber0.5How far out from the centre photos fade into the background, 0 to 1. Faded photos cannot be hovered or opened.
cardSizenumber0.28Photo size, as a share of its distance from the centre.
roundnessnumber0.22Corner rounding; 1 makes circles.
tiltnumber1How much photos turn with the spiral; 0 keeps them upright.
rotationnumber0Turns the whole spiral, in degrees.
direction"counterclockwise" | "clockwise""counterclockwise"Which way the spiral winds.
speednumber0.35Flow speed; negative flows inward.
centerXnumber0.5Horizontal position of the centre, 0 to 1.
centerYnumber0.5Vertical position of the centre, 0 to 1.
shadownumber0.5Strength of the shadow under the photos.
backgroundColorstring"transparent"Color behind the photos.
openOnClickbooleantrueClicking a photo brings it upright to the centre at full size. Click again, scroll or press Escape to put it back.
captionsbooleantrueShows the title and subtitle of the opened photo.
draggablebooleantrueDrag around the centre to wind the spiral like a dial, with a little momentum.
wheelbooleantrueScrolling moves the photos along the spiral, one photo per notch.
pauseOnHoverbooleantrueHovering a photo stops the flow and lifts that photo slightly.
interactivebooleantrueLets the pointer and keyboard drive the gallery. Arrow keys move one photo at a time; Enter opens the highlighted photo.
pausedbooleanfalseStops the automatic flow. Scrolling and dragging still work.
dprnumber2Kept for parity with canvas galleries; this one is drawn by the browser at its own pixel ratio.
ariaLabelstring"Spiral gallery"Label announced for the gallery.
onOpen(item: SpiralGalleryItem, index: number) => voidNoneCalled when a photo is opened.
refRef<SpiralGalleryHandle>NoneHandle with step, open and close.
childrenReactNodeNoneContent laid over the gallery.
classNamestringNone
styleCSSPropertiesNone

Related