I am not sure if it will work because I have not tried it but sharing here what I have researched about it--
You need to use parameters
hideEffect for animation.
you can check all parameters of
dialog in this file --
and you can search for an effect from this file --
here you would find effect
Effect.SlideUp, might be this is what you looking for.
Now above code like like -
var win = Dialog.confirm(
showEffect: // here you can check by use either Element.SlideDown or Effect.SlideDown
hideEffect: // here you can check by use either Element.SlideDown or Effect.SlideDown
This is just an idea, you need to play a bit with above code.
I hope it would help you.