Is there a way to have a lightbox close automatically after a certain amount of time with a fade out effect?

Hi! I am new to coding so bare with me.
Is there a way to have a lightbox close automatically after a certain amount of time with a fade out effect?
I have figured out a code to make it close by itself but not with any effect. What can I add to this to create the smoother fade out effect upon closing?

import wixWindow from ‘wix-window’;

$w.onReady(function() {
setTimeout(function() {wixWindow.lightbox.close()}, 50000);
} );

Thanks!!

Hello.

You can try the fade out options suggested in this forum discussion: https://www.wix.com/corvid/forum/community-discussion/resolved-close-lightbox-with-a-fadeout-effect/p-1/dl-5bc11b485069320046e3e90d

Good luck!

@marifarney110 Did you get this to work?