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.
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.
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
npx shadcn add "https://ui.beste.co/r/gallery2?email=YOUR_EMAIL&license_key=YOUR_KEY"Base UI flavor
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.
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.
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:
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",
}}
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
badge | { label: string } | – | Eyebrow label rendered as a Badge7 |
heading | string | – | Section heading above the grid |
items | LightboxImage[] | [] | Photographs in the grid, in order |
labels | Gallery2Labels | {} | Fixed strings that are not content: viewer controls and the counter separator |
lightbox | boolean | true | Render the built-in viewer; set false to leave the frames static |
className | string | – | Extra classes for the outer <section> |
type LightboxImage = {
src: string;
alt: string;
title: string;
meta: string;
};
type Gallery2Labels = {
closeLabel?: string;
previousLabel?: string;
nextLabel?: string;
counterSeparator?: string;
};lightbox={false} disables every frame button and switches the cursor back to default, leaving a plain captioned grid.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.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.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.button wrapping the picture and both caption lines, so the whole tile is a single target rather than a small link under an image.aspect-[4/3] and carry no hover treatment: the picture is content, and the viewer is what happens when you want it larger.gallery29
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.
gallery26
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.
gallery1
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.
gallery3
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.
gallery6
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.
gallery28
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.