Lightbox Frame Grid

(Selected frames)

Tap any frame to see it properly.

About this block

Lightbox Frame GridPRO

Captioned image grid where any tile opens a full-screen lightbox on a dark scrim, with a frame counter, keyboard arrows, escape to close and previous and next controls beside the caption.

Gallery2: Lightbox Frame Grid

A plain grid of captioned frames with a full-screen dark viewer behind them: counter top left, close top right, the picture at full height and the caption on a rule with the step controls.

Upgrade to Pro

Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.

Upgrade Now

Installation

Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/gallery2?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/gallery2?email=YOUR_EMAIL&license_key=YOUR_KEY"

This installs the block to components/beste/block/gallery2.tsx plus the badge7 eyebrow it uses.

Quick start

The installed file exports gallery2Demo alongside the block: the exact props behind the preview above. Spread it to get a working gallery in one line.

tsx
import { Gallery2, gallery2Demo } from "@/components/beste/block/gallery2";

export default function Page() {
  return <Gallery2 {...gallery2Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { Gallery2 } from "@/components/beste/block/gallery2";

export default function Page() {
  return (
    <Gallery2
      badge={{ label: "Selected frames" }}
      heading="Tap any frame to see it properly."
      items={[
        {
          src: "/frames/stairwell.jpg",
          alt: "Concrete stairwell lit from one window",
          title: "Stairwell, north wing",
          meta: "North wing, March 2026",
        },
        {
          src: "/frames/issues.jpg",
          alt: "Stacked printed magazines",
          title: "Six issues, one grid",
          meta: "On the press floor, 2025",
        },
      ]}
      labels={{
        closeLabel: "Close",
        previousLabel: "Previous frame",
        nextLabel: "Next frame",
        counterSeparator: "of",
      }}
    />
  );
}

Props

PropTypeDefaultDescription
badge{ label: string }Eyebrow label rendered as a Badge7
headingstringSection heading above the grid
itemsLightboxImage[][]Photographs in the grid, in order
labelsGallery2Labels{}Fixed strings that are not content: viewer controls and the counter separator
lightboxbooleantrueRender the built-in viewer; set false to leave the frames static
classNamestringExtra classes for the outer <section>
ts
type LightboxImage = {
  src: string;
  alt: string;
  title: string;
  meta: string;
};

type Gallery2Labels = {
  closeLabel?: string;
  previousLabel?: string;
  nextLabel?: string;
  counterSeparator?: string;
};

Behavior notes

  • Setting lightbox={false} disables every frame button and switches the cursor back to default, leaving a plain captioned grid.
  • Escape closes the viewer and the left and right arrows step through it, with the index wrapping in both directions so the last frame runs back to the first.
  • The viewer is a fixed inset-0 column on bg-foreground/95: header, picture and caption are three rows, so the controls never sit on top of the photograph.
  • The picture is object-contain inside a min-h-0 flex-1 box, which is what lets a portrait and a landscape frame both fit without cropping or pushing the caption off screen.
  • Inside the viewer every token is a fixed background shade, correct for a surface that is dark in both themes, and the rule under the picture is border-background/20 for the same reason.
  • The next control is solid and the previous one is outlined, so the pair reads as a direction rather than two identical buttons.
  • Each grid item is one button wrapping the picture and both caption lines, so the whole tile is a single target rather than a small link under an image.
  • Grid frames hold aspect-[4/3] and carry no hover treatment: the picture is content, and the viewer is what happens when you want it larger.

More Gallery blocks

View all Gallery
PRO

gallery29

Plate Grid Lightbox

An even three-column grid of photographic plates that open into an ink lightbox: every frame keeps the same ratio so the captions line up, arrows and keys turn the page, either half of the plate is clickable, and a plate that belongs to a page offers it as a link.

PRO

gallery26

Cover Archive With Lightbox

A square cover grid that names each picture only on hover and opens it full screen on click, where arrows and the keyboard walk the archive and a link leads into the issue itself.

PRO

gallery1

Masonry Caption Gallery

Masonry gallery built with CSS columns so images keep their own heights, each captioned with its subject and place, and any frame opening a drawer that slides in from the right while the wall stays visible behind the scrim.

PRO

gallery3

Filterable Album Grid

Album gallery with pill filters that swap the whole set below, where any tile opens a light full-screen viewer: the frame hangs on the page surface while a side column carries the caption, the album summary, the controls and a plainly labelled thumbnail index.

PRO

gallery6

Mosaic Full Screen Viewer

Dense caption-free mosaic where every tile carries an expand seal and opens a full-screen viewer with arrow controls on the picture, escape and arrow keys, a counter, the caption and a thumbnail filmstrip.

PRO

gallery28

Light Masonry

A three-column masonry of photographs in mixed aspects, each rising into view and drifting inside its frame as the page scrolls, with a serif subject and a small-caps place and month under every plate; any plate opens a paper-toned lightbox that sets the subject large beside the picture, turns pages by clicking either half of the plate, the arrows or the keyboard, and slides each plate in from the side it came from.