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| Name | Type | Default | Description |
|---|---|---|---|
images | (string | { src: string; alt?: string })[] | DEFAULT_IMAGES | The pictures: URLs, or { src, alt } to describe each one. |
fit | number | 0.5 | Size 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. |
minRadius | number | 600 | The smallest radius the dome may have, in pixels. |
maxRadius | number | Infinity | The largest radius the dome may have, in pixels. |
padFactor | number | 0.25 | Padding around each picture, as a fraction of its cell shared by both sides. |
overlayBlurColor | string | "#120F17" | Color of the outer part of the soft overlay around the dome and behind an opened picture. |
maxVerticalRotationDeg | number | 5 | How far the dome can tip up or down, in degrees. |
dragSensitivity | number | 20 | Sensitivity of dragging. |
enlargeTransitionMs | number | 300 | How long a picture takes to enlarge, in milliseconds. |
segments | number | 35 | How finely the dome is cut on both axes: more segments mean more, smaller tiles. |
dragDampening | number | 2 | How quickly the spin dies away after a release: higher stops sooner. |
openedImageWidth | string | "400px" | Width of the enlarged picture, as a CSS length. |
openedImageHeight | string | "400px" | Height of the enlarged picture, as a CSS length. |
imageBorderRadius | string | "30px" | Corner radius of the tiles, as a CSS length. |
openedImageBorderRadius | string | "30px" | Corner radius of the enlarged picture, as a CSS length. |
grayscale | boolean | true | Shows every picture in grayscale. |
className | string | None |