liftbox

React lightbox comparison

How this MIT-licensed React lightbox compares with yet-another-react-lightbox, PhotoSwipe, lightGallery, react-image-gallery and react-photo-view.

Each cell comes from the library's published package, source and documentation as of November 3, 2026, for the versions listed. Spot something out of date? Open an issue and it gets fixed.

Why choose this package

It is MIT, so you can ship it in a closed-source product without buying anything or setting a license key. That is the real difference from lightGallery 3, which covers a lot of the same ground (grids, deep links, YouTube and Vimeo) but asks for GPL-3.0 or a paid license. Migrating from lightGallery maps the props.

Zoom, thumbnails, video, YouTube, Vimeo, slideshow, fullscreen, download, share, rotation and deep links are all props on one component. In YARL each of those is a plugin with its own import, and grids come from a second package, react-photo-album.

The image opens out of the thumbnail you clicked, cropped the same way, and flies back into it when you close. PhotoSwipe, lightGallery and react-photo-view do this as well; YARL does not.

Masonry, justified and uniform grids and a category filter ship in the same package, and bundlers drop them when you only import Lightbox. No runtime dependencies either, and it stays fast with thousands of slides.

At a glance

FeatureliftboxYARLPhotoSwipelightGalleryreact-image-galleryreact-photo-view
Version1.2.03.33.05.4.4 with react-photoswipe-gallery 4.1.23.0.0 with @lightgallery/react2.1.21.2.7
LicenseMITMITMITGPL-3.0 or a paid commercial licenseMITApache-2.0
React18, 1916.8 to 1916.8 and up18, 1916 to 1916.8 and up
KindModalModal, inline with a pluginModalModal and inlineInline carouselModal
Opens from thumbnailYes, also from cropped thumbnailsNoYesYes, cropped with the originCrop pluginNoYes
GridsMasonry, justified, uniform, and a filterNo, pair it with react-photo-albumNoJustifiedNoNo
Thumbnail stripBuilt inPluginNoPluginBuilt inNo
ZoomBuilt inPluginBuilt inPluginNoBuilt in
Native videoBuilt inPluginSeparate plugin, in developmentPluginCustom renderNo
YouTube and VimeoBuilt in, without their player scriptsNoNoPluginCustom renderNo
SlideshowBuilt inPluginNoPluginBuilt inNo
FullscreenBuilt inPluginA recipe in the docsPluginBuilt inNo
DownloadBuilt inPluginReact wrapperBuilt inNoNo
ShareBuilt inPluginNoPluginNoNo
RotationBuilt inPluginNoPluginNoBuilt in
Deep links (URL hash)useLightboxHashNoReact wrapperPluginNoNo
JS size, min and brotli13.12 kB, everything above9.49 kB core, 19.46 kB with every plugin17.49 kB25.32 kB with zoom, thumbnails, video, fullscreen and slideshow9.14 kB6.81 kB

Accessibility

LibraryDialog with aria-modalFocus trapFocus returnSlide announcementsReduced motion
liftboxYesYesYesYesYes
YARLYesThe rest of the page is inertYesYes, off during autoplayYes
PhotoSwipeDialog, no aria-modalYesYesNoYes
lightGalleryYesYesYesYesYes
react-image-galleryNot a dialogNot a dialogNot a dialogYesNo
react-photo-viewDialog, no aria-modalNoNoNoNo

See Accessibility for what this package does in detail.

When to pick another library

  • YARL if you need React 16 or 17, an inline carousel, or the smallest possible core with only the plugins you use. It also has the largest community of the React options here.
  • PhotoSwipe if you are not on React, or want the same lightbox across frameworks.
  • lightGallery if you need Wistia, comments or a vendor-supported license, and the GPL-3.0 or commercial license works for you.
  • react-image-gallery if you want a carousel on the page rather than an overlay.
  • react-photo-view if you only need a minimal image viewer and no video or thumbnails. Its last release was in January 2025.

This package has no inline mode, and its built-in features cannot be dropped from the bundle one by one. The 13.12 kB above always includes all of them. See Bundle size.

How the sizes were measured

With size-limit and @size-limit/preset-small-lib, minified and compressed with brotli, React and React DOM excluded. JavaScript only, without stylesheets. Each entry imports:

LibraryImports
liftboxLightbox
YARLThe default export, then also Zoom, Thumbnails, Fullscreen, Slideshow, Video, Captions, Counter, Download, Share and Rotate
PhotoSwipeGallery and Item from react-photoswipe-gallery, and photoswipe
lightGallery@lightgallery/react with its zoom, thumbnail, video, fullscreen and autoplay plugins
react-image-galleryThe default export
react-photo-viewPhotoProvider and PhotoView

Moving over? See Migrating from yet-another-react-lightbox and Migrating from lightGallery.

Edit this page on GitHub

On this page