This gist contains different implementations of TransitionExpand found for Vue2 here. Feel free to read his article also, to get idea how he got to the result.
TransitionExpandOriginal.vue
contains original code ported to Vue3. Before hide element it applies same width, setting position absolute with hidden visbility. Doing so DOM element is rendered invisibly, so that its possible to get the element height.TransitionExpandAlternative.vue
on the other side uses elemnts scrollHeight as the final target height. This approach was ispired by vue3-slude-up-down. I like this one more, as it has much less lines and less operations.TransitionExpandTailwind.vue
the last implementation is based on theAlternative
solution, while using tailwind instead of custom wr