Presence Animations

Presence animations allow you to handle entry and exit animations for elements being added or removed from the DOM.

Syntax

{#if isVisible}
  <div
    use:mercury={{
    animate:{scale:2}
    }}
    out:animateExit={{opacity:0,scale:0}}
  >
    Presence Animation
  </div>
{/if}