This is just
The magic of the vertical box.
put a button with the underlying text in a horizontal box. Set the clipping to Clip To Bounds (so that the element is not visible if its outside of the box) and just animate the height of the box. Now stack that multiple times into another v box and you have an accordion