Everything a lightbox should do.
Native gestures out of the box. The design is entirely up to you. A headless React image viewer built on Base UI and Motion.
Click any image. Swipe, pinch or scroll to zoom, pull to dismiss.
Install
pnpm add @frontendsupply/lightbox @base-ui/react motionThen follow Getting started.
Features
Morph, not fade
The thumbnail grows into the photo and un-crops on the way. Rounded corners, object-fit and object-position included.
Real scroll physics
Swiping is a native scroll-snap scroller, so touch and trackpad get the OS’s own momentum.
Pinch, wheel, double-tap
Zoom follows your fingers, rubber-bands at the limits, and pans with inertia.
Pull to dismiss
Drag the photo away; the backdrop fades with you and a flick carries its velocity home.
The page keeps up
Navigate inside the viewer and the page behind scrolls along, so closing lands on the right thumbnail.
Zero opinions
No CSS ships. Style every part with Tailwind, CSS modules or anything else, via data attributes and a CSS variable.