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
headingstring–Section 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
classNamestring–Extra 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

PRO

gallery26

Cover Archive With Lightbox

PRO

gallery1

Masonry Caption Gallery

Get Pro access