You need a width on the immediate child element for the animation to work correctly.

You can collapse horizontally this card by clicking Toggle