Svelte Scrollto Element screenshot

Svelte Scrollto Element

Author Avatar Theme by Bartholomej
Updated: 5 Jan 2025
18 Stars

Scroll to element with smooth animation. Lightweight library for Svelte. No dependencies! Pure Svelte.

Overview

The “svelte-scrollto-element” is a TypeScript/JavaScript library that allows for animating vertical and horizontal scrolling in Svelte applications. It is compatible with SvelteKit, SSR, and adapter-static setups.

Features

  • Animating vertical and horizontal scrolling
  • TypeScript and JavaScript support
  • Useful options for customization
  • Compatible with SvelteKit, SSR, and adapter-static setups

Installation

To install the “svelte-scrollto-element” library, follow these steps:

  1. Install via npm:
npm install svelte-scrollto-element
  1. Import the library in your Svelte component:
import { scrollToElement } from 'svelte-scrollto-element';

Summary

The “svelte-scrollto-element” is a powerful library for animating scrolling in Svelte applications. It offers a range of options for customization and is compatible with various Svelte setups. With its easy installation and usage, developers can easily incorporate smooth scrolling into their Svelte projects.