Hi @akbarmahfuzalam ,
Nice thought, and I managed to create a demo for your reference:

Is above what you need?
If so, steps are as follows:
1. Add a Vertical Container, cut your Gallery and paste into the Container.
2. Add one Button, 2 Timer controls.
3. OnVisible of the Screen:
UpdateContext({'E/C':true,TimerStart1:false, TimerStart2:false})
4. Duration of the two Timers set to 1000 or how long/quick will you like the Gallery being expanded/collapsed.
5. OnTimerStart of Timer1 to as below and vise versa.
Reset(Timer2)
6. Start of Timer1 to TimerStart1, Timer2 to TimerStart2
7. Width of Container:
If(!TimerStart1 && !TimerStart2, 650, If('E/C', 650*(Timer3.Value/Timer3.Duration), 650*((1000-Timer1.Value)/Timer1.Duration) ))
650 is the default width of the Container, change to what you want.
8. OnSelect of Button:
UpdateContext({'E/C':!'E/C', TimerStart1: If('E/C', true, false), TimerStart2: If('E/C', false, true)})
9. After everything tested fine, set Visible of the two Timers to false to hide them.
Best regards,