Components / component
Lightbox Gallery
A grid of thumbnails. Choosing one opens the photo from the thumbnail's place into a lightbox, with previous, next and keyboard controls.

Implementation
A grid of thumbnails. Choosing one opens the photo from the thumbnail's place into a lightbox, with previous, next and keyboard controls.
- Framework
- React 19.3.1 with TypeScript
- Motion
- Native CSS and browser APIs. No GSAP required.
- Available modes
- build
- Version
- 1.0.0 · published
Source code
Quality evidence
Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .
Changelog
v1.0.0 · A grid of thumbnails. Choosing one opens the photo from the thumbnail's place into a lightbox, with previous, next and keyboard controls.
Frequently asked questions
How does the photo grow out of its thumbnail?
The photo is animated from the thumbnail's box to its final box with the Web Animations API, and back again when it closes.
Where does focus go when the lightbox closes?
Back to the thumbnail that opened it, because the lightbox is a native dialog opened with showModal.