1. Utilities
  2. scrollToBottom

Utilities

scrollToBottom

scrollToBottom is a custom Svelte function that helps to scroll to the bottom of a container element.

Demo

svelte is love 1
svelte is love 2
svelte is love 3
svelte is love 4
svelte is love 5
svelte is love 6
svelte is love 7

Usage

        <script>
  import { scrollToBottom } from "sveltronics";

</script>

<div>
  <div use:scrollToBottom>
    {#each todos as todo (todo.id)}
      <div>{todo.text}</div>
    {/each}
  </div>
</div>