slide

A custom Svelte transition utility to slide the element in top, left, right, bottom, top-left, top-right, bottom-left and bottom-right directions.

Demo

0ms
300ms

Usage

<script>
import { slide } from "svelte-legos";

</script>

<div transition:slide />

<!-- or with options -->

<div transition:slide={{
  delay // number
  duration // number
  easing // svelte/easing
  direction // "top" | "top-right" | "right" | "bottom-right" | "bottom" | "bottom-left" | "left" | "top-left"
}} />