A fast, lightweight image lightbox built with vanilla JavaScript. Smooth zoom on desktop, pinch zoom on touch. One file, no jQuery, no frameworks, no bloat.
Features
Click any image to open it fullscreen with a smooth fade transition. Keyboard navigation with Escape to close and arrow keys for galleries.
Scroll to zoom on desktop with momentum. Pinch to zoom on touch devices with proper inertia. Double-tap to toggle zoom level. Pan with drag.
Pure vanilla JavaScript. No jQuery, no React, no framework runtime. One JS file, one CSS file. Works everywhere JavaScript runs.
First-class touch support with pinch, pan, and swipe gestures. Desktop users get scroll zoom, keyboard nav, and click-outside-to-close.
Usage
Add data-litebox to any image. That's it.
MIT-licensed, free forever. Use it on client sites, personal projects, or commercial products. Star it on GitHub if it saves you time.