The simplest vanilla JavaScript lightbox with zero dependencies
Get it atClick any image below to see the lightbox in action.
Why choose our vanilla JavaScript lightbox? Zero dependencies, minimal code, maximum performance. Perfect for developers who want simple, clean solutions.
Add the CSS and JavaScript files to your HTML (no external dependencies required):
<link rel="stylesheet" href="lite-light.min.css">
<script type="module">
import { init } from 'lite-light.min.js';
init();
</script>
Add the data-lightbox
attribute to any image with the URL of the high-resolution version:
<img src="thumbnail.jpg" data-lightbox="full-size.jpg" alt="Description">
That's it! Your simple vanilla JavaScript lightbox is ready. No jQuery, no frameworks, just pure JavaScript magic.