Changing dimension over time in motion study

Hello all, I have been trying to recreate this animation: https://www.youtube.com/watch?v=JWQSj4A_BkI&t=1s

However, I am currently stuck with the changing of dimension over time, is there anybody out there will be able to guide me with it?

SolidworksMotion Studies