Add animation to Mega Menu

I’ve created many a mega menu, but I’d love it if someone shared some code on an animated one - one that expands and collapses smoothly… Can anyone embellish this code to make my menu animate?

Here is my tried & true code: });

let timeout

export function ShopButton_mouseIn ( event , $w ) {
$w ( “#ShopStrip” ). expand ();
$w ( “#ShopButton” ). disable ();
}
export function ShopButton_mouseOut ( event , $w ) {
timeout = setTimeout (() =>{ $w ( “#ShopStrip” ). collapse ()}, 5000 )
$w ( “#ShopButton” ). enable ()
}
export function ShopStrip_mouseIn ( event , $w ) {
clearTimeout ( timeout )
$w ( “#ShopButton” ). disable ();
}
export function ShopStrip_mouseOut ( event , $w ) {
$w ( “#ShopStrip” ). collapse ();
$w ( “#ShopButton” ). enable ()
}