Gallery open animation #240
-
Hello, is it possible to change gallery open animation? right now, the animation looks like: opacity: 0 -> opacity: 1. And I would like to also add a scale animation to open, from 0.9 to 1 together with opacity animation. I tried to change container in render method, but it broke styles for images etc |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi there!
Have you tried adjusting fade animation settings? You can adjust fade animation duration and the timing function. https://yet-another-react-lightbox.com/documentation
Is this the effect you are trying to achieve? .yarl__portal {
transform: scale(0.9);
transition: transform 0.25s ease;
}
.yarl__portal_open {
transform: scale(1);
} |
Beta Was this translation helpful? Give feedback.
-
@igordanchenko, I have one more question regarding animation. I'm using a custom render method for |
Beta Was this translation helpful? Give feedback.
Are you trying to customize the Close button icon? Custom
iconClose
render prop would be more appropriate in this case.However, if you need to render a custom Close button, you can close the lightbox with a transition effect by calling the
close
method on the Controller ref.