svelte-transitions-fly
Fly transition plugin for Svelte. Demo
Usage
Recommended usage is via svelte-transitions, but you can use this module directly if you prefer. Note that it assumes an ES module or CommonJS environment.
Install with npm or yarn:
npm install --save svelte-transitions-fly
Then add the plugin to your Svelte component's exported definition:
visible {#if visible} <!-- use `in`, `out`, or `transition` (bidirectional) --> hello!{/if}
Parameters
x
and y
are the position the node will fly in from (and out to). Both default to zero:
flies in from the left
You can also specify delay
and duration
parameters, which default to 0
and 400
respectively, and a custom easing
function (which should live on your helpers
):
wheee!!!!