Skip to content

Gallery

With lightbox, each image links to its full size file. JavaScript turns that link into one shared Dialog with previous and next buttons; the arrow keys also step through images and Escape closes it.

  • images: list of { src, alt, caption, full }; full is the lightbox image and defaults to src
  • columns: 2, 3 (default), 4
  • layout: columns (default), masonry (natural heights), carousel (uses Carousel, columns sets the per-view)
  • ratio: square, portrait, landscape (default), wide; ignored for masonry
  • lightbox: opens images in a Dialog with previous and next controls
  • captions: shows captions under images (default true)
  • surface: light, alternate, brand, dark
  • id: prefix for the lightbox dialog id, needed when a page has more than one gallery
<Gallery
title="Samla in use"
lightbox
images={[
{ src: "/gallery/demo-site.jpg", full: "/gallery/demo-site-large.jpg", alt: "The demo site", caption: "The demo site" },
]}
/>
layout="masonry" columns="3" lightbox
layout="carousel" columns="3" surface="alternate"
columns="4" ratio="square", no captions
columns="2" ratio="wide"