I am developing a React-widget (step-by-step-wizard), which fetches and shows content from an API. I don't know, how long the texts, I am fetching from the API, are. So I don't know, the height of the widget. The widget should increase the height regarding to the content (like the default HTML-elements). There should be no scrolling.
I can not set a fixed height here. So I can not set position: absolute
to the slides I want to animate.
At the moment the animation looks like the following:
The second slide appears below the first slide until the first slide disappears and the second one moves up. Of course, this is completely ugly.
If I set a fixed height and position absolute to the slides everything works fine and smooth.
You can see a demo of my problem here: https://codepen.io/anon/pen/jdQPRw