Total noob here Consider the following using sveltekit (svelte-5) and tailwindcss:
<div class="flex flex-col justify-center items-center gap-8 w-[350px]" bind:this={instance}>
<img src="/logo/logo-web.svg" alt="" class="max-w-[64px]" />
{#if loginUserStore.step === 'login'}
<EmailPassword />
{:else if loginUserStore.step === 'reset'}
<Reset />
{:else if loginUserStore.step === 'confirm'}
<Confirm />
{/if}
</div>
When loginUserStore.step changes, the content of the modal changes. The modal height is set to auto (its not actually defined) and has a fixed width.
How can I use GSAP to animate the height of the modal when the dynamic content changes ?
I made a svelte REPL here: https://svelte.dev/repl/2e81e9e7aba64e54bdbe45f7e5d193f4?version=4.2.15 to show how it currently works.