tiny-scrollto
v1.0.6
Published
Animate DOM scrolling. 0.4kB, zero dependencies.
Downloads
11
Readme
tiny-scrollto
Animate DOM scrolling. 0.4kB, zero dependencies.
Install:
npm install -S tiny-scrollto
Use:
import {scroll} from 'tiny-scrollto'
scroll(500)
scroll('end') // Scroll to end of document
tiny-scrollto
also exports a clamp
utility function:
import {clamp} from 'tiny-scrollto'
const x = clamp(x, 0, 1) // Clamp x to the range 0-1