Component packs › Threshold › 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.
| Prop | Type | Default | Description |
|---|---|---|---|
items | SharedLightboxItem[] | ||
fixed | boolean | ||
theme | "light" | "dark" | ||
autoplay | number | false | Showcase mode: opens one, steps through and closes every N ms while visible. |
open(index: number): voidclose(): voiddestroy(): voidimport SharedLightbox from './SharedLightbox';
<SharedLightbox />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Dialogs and drawers.