biati-digital / glightbox

Pure Javascript lightbox with mobile support. It can handle images, videos with autoplay, inline content and iframes
MIT License
2.03k stars 228 forks source link

Medium zoom opening effect #391

Open jimblue opened 1 year ago

jimblue commented 1 year ago

It would be awesome to make a smoother transition between the thumbnail and the ligthbox like in Medium.

There is already this medium zoom npm package but it only works for single image.

gingerchew commented 1 year ago

That's a really cool idea, @jimblue!

Unfortunately, it would be tough to integrate something like for 2 reasons.

  1. GLightbox has a general rule of 0 dependencies
  2. The way medium zoom handles the image transition wouldn't work with the current GLightbox slide creation.

Currently the way the GLightbox slides are generated, the whole lightbox is generated on the fly. That makes handling the zoom/transition a little bit funkier.

Though, I'd love to see a proof of concept that proves me wrong on that.

We have floated the idea of a plugin system in the past, but that would be a future endeavor.

I'll still add the feature request tag since this would make a nice addition!

jimblue commented 1 year ago

Hey @gingerchew 🙂 You can probably look at Photoswipe. It doesn't use any dependency and the lightbox is generated on the fly.

Andrew-web-coder commented 1 year ago

@jimblue Fancybox v5 also looks great and comes with two types of thumbnails!