skrolla

A tiny plugin for scrolling to specific places on a page.

Usage no npm install needed!

<script type="module">
  import skrolla from 'https://cdn.skypack.dev/skrolla';
</script>

README

Skrolla

npm version

A tiny plugin for scrolling to specific places on a page. :cyclone:

Getting started

Skrolla is available via npm and yarn, but you can just as easily download the script and then include it in your document. After that, all that's needed is to add the [data-skrolla]-attribute to clickable elements with its value pointing to an existing ID in your HTML. :sunglasses:

Older browsers

Skrolla uses a few things introduced in later version of ECMAScript, so if you're unsure of what may or may not be supported, I'd recommend using the script compiled by Babel. :v:

To-do

  1. Docs & demo
  2. More easings?

License

MIT Licensed. Skrolla is yours to tinker with, if you'd like. Have fun! :blush: