Skip to content
PixiKit

Sphere Gallery

Pictures tiled over the inside of a dome: drag to spin it with inertia, click a tile to fly it out to an enlarged view, click or press Escape to put it back.

pixikit.com/docs/components/sphere-gallery

Customize

Fit0.80
Fit basis
Min radius600px
Max radius
Pad factor0.25
Overlay blur color
Max vertical rotation deg0°
Drag sensitivity20
Enlarge transition ms300ms
Segments34
Drag dampening2.0
Grayscale

Props

18
NameTypeDefaultDescription
images(string | { src: string; alt?: string })[]DEFAULT_IMAGESThe pictures: URLs, or { src, alt } to describe each one.
fitnumber0.5Size factor for the dome radius, based on the container's dimensions.
fitBasis"auto" | "min" | "max" | "width" | "height""auto"Which dimension the dome size is based on.
minRadiusnumber600The smallest radius the dome may have, in pixels.
maxRadiusnumberInfinityThe largest radius the dome may have, in pixels.
padFactornumber0.25Padding around each picture, as a fraction of its cell shared by both sides.
overlayBlurColorstring"#120F17"Color of the outer part of the soft overlay around the dome and behind an opened picture.
maxVerticalRotationDegnumber5How far the dome can tip up or down, in degrees.
dragSensitivitynumber20Sensitivity of dragging.
enlargeTransitionMsnumber300How long a picture takes to enlarge, in milliseconds.
segmentsnumber35How finely the dome is cut on both axes: more segments mean more, smaller tiles.
dragDampeningnumber2How quickly the spin dies away after a release: higher stops sooner.
openedImageWidthstring"400px"Width of the enlarged picture, as a CSS length.
openedImageHeightstring"400px"Height of the enlarged picture, as a CSS length.
imageBorderRadiusstring"30px"Corner radius of the tiles, as a CSS length.
openedImageBorderRadiusstring"30px"Corner radius of the enlarged picture, as a CSS length.
grayscalebooleantrueShows every picture in grayscale.
classNamestringNone

Related