Component packs › Threshold › Lightbox

Lightbox

The thumbnail lifts out of the grid and grows into the large view; closing sends it back into its exact place, even after the arrows.

Lightbox is a lightbox from Threshold, a component pack with 6 overlays: Dialogs, drawers and sheets that come out of where you tapped and go back into it. Price: $2 for the whole pack.

Built with: shared element, uniform scale only, arrow keys.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Lightbox props

PropTypeDefaultDescription
itemsSharedLightboxItem[]
fixedboolean
theme"light" | "dark"
autoplaynumber | falseShowcase mode: opens one, steps through and closes every N ms while visible.

Methods on the ref

Use it in React

import SharedLightbox from './SharedLightbox';

<SharedLightbox />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Threshold

Good for: Dialogs and drawers.