Animated layout transitions

I’m trying to implement a tile that can expand or collapse based on whether its dynamic content is visible.

The tile is structured as a column. When expanded, it shows a GoalTasks component, which is also a column containing an Artboard list of dynamic size. When collapsed, that content is hidden.

What I’d like to achieve is an animated transition between the two states, ideally animating both the height and opacity as the content appears or disappears.

But when collapsed, it is not visible.

So far, I haven’t found a built-in way to animate the tile’s height when the child content has a dynamic size.

Is there a recommended approach for animating this kind of expand/collapse layout transition?