A dependency-free pure JavaScript lightbox script with touch support and a modern minimal design.
baguetteBox.js is a lightweight, dependency-free JavaScript library for creating image lightboxes. It allows developers to display images in a modal overlay with navigation, captions, and touch support, solving the need for a simple, embeddable gallery without relying on larger frameworks.
Frontend developers and web designers who need a straightforward, no-fuss lightbox solution for image galleries on websites or web applications.
Developers choose baguetteBox.js for its zero dependencies, small footprint (~3.2KB gzipped), and ease of integration, offering essential lightbox features like touch gestures, responsive images, and customization without the bloat of larger libraries.
:zap: Simple and easy to use lightbox script written in pure JavaScript
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Written in pure JavaScript with no need for jQuery or other libraries, reducing bundle size and simplifying integration, as explicitly stated in the features.
Gzipped size is around 3.2KB, making it one of the smallest lightbox scripts available, ideal for performance-focused websites.
Includes swipe navigation for touch-screen devices, enhancing mobile usability without additional configuration.
Supports data-at-{width} attributes to serve appropriate image sizes based on screen resolution, improving load times and user experience.
Focused solely on images; does not natively support videos, PDFs, or other content types, which may require custom workarounds for multimedia galleries.
While options exist for captions and buttons, deep UI or animation changes require overriding CSS or modifying source code, as it offers limited built-in themes.
Designed for vanilla JavaScript; integrating with modern frameworks like React or Vue can be cumbersome without creating wrapper components or handling DOM manually.