Do plugins like Zoom, Fullscreen work with custom rendered slide content? #161
-
Hi, short question, as the title suggests, is it possible that custom rendered slide content works with e.g: zooming, other plugin functionalities? I didn't necessarily try it out yet, but i know that it does not work for photoswipe gallery. Furthermore, if you would build a custom comment section where would you put the comment section? As a part of the custom slide content or is it also possible to make an overlay that floats right sided next to the slide content without any issues? So far photoswipe gallery and lightgallery have both problems handling this and theres a lot of customisation needed to make those things work. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi there!
Most plugins work fine with custom rendered slide content. Zoom plugin is a special case though. It supports only image slides (
I could provide better advice if you could share a mock-up of the feature you have in mind. If you want to put some content / custom elements that are absolutely positioned over the slide, you can use render={{
slideFooter: () => (
<div style={{ color: "white", position: "absolute", bottom: 10, right: 10 }}>
Content
</div>
),
}} But if you want to implement a side panel like in Google Photos (see #121), you can implement it by adding a custom module to the lightbox. https://codesandbox.io/p/sandbox/yet-another-react-lightbox-121-6spot4 I hope this helps. |
Beta Was this translation helpful? Give feedback.
-
wow, that Info plugin approach looks pretty good (thanks for sharing that) :) Another question, is there some sort of component that is a direct child of the , like in other libraries? My approach/structure is currently that i have a gallery component where i map through my array[][] of data and then a child component that basically displays all elements in a thumbnail like manner in the gallery, but when i press one i would like to open the gallery directly. Would this approach work with the render or slides properties as well without changing too much of my structure? Hence, another feature i would maybe need to apply is that in our software we sometimes have media like comments or audio or so without image content, so i would like to put this centered as slide content instead of a typical image. (i'm not sure how far its gonna go, but maybe even having an image + other content simultaneously on the slide content (thats why i asked about if the plugins like zooming, download image and such would still work), but i guess that would need some customisation. |
Beta Was this translation helpful? Give feedback.
Hi there!
Most plugins work fine with custom rendered slide content. Zoom plugin is a special case though. It supports only image slides (
slide.type === undefined || slide.type === "image"
), and it takes over image rendering even when you define your ownrender.slide
render function (you may not necessarily need to provide customrender.slide
function in your case). While it's possible to add support for custom slide types, I'd like to learn about specific real-life use case before I implement such support.