1.0.2 • Published 10 months ago

svelte-smooth-scroll v1.0.2

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

svelte-smooth-scroll

Simple Svelte Smooth Scroll inspired by valmisson/svelte-scrolling

Usage

<button on:click={() => scrollTo('section-1')}> Go to 1</button>
<button on:click={() => scrollTo('section-2')}> Go to 2</button>
<button on:click={() => scrollTo(section3)}> Go to 3</button>

<div use:smoothScroll={'section-1'}>
	<h1>Section 1</h1>
</div>
<div id="section-2" use:smoothScroll>
	<h1>Section 2</h1>
</div>
<div bind:this={section3}>
	<h1>Section 3</h1>
</div>
1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago