Fast, light-weight (4KB gzip), and dependency-free content scroller.
Add a license file. Specify the MIT license in the package.json
. Don't bump the major version since ISC and MIT are basically the same.
Fix possible double initialization when the DOMContentLoaded
event happens after the manual initialization with useExternalLayout
. Prevent instantiation in constructor on initialized elements.
Weight, dependency, and performance improvements; pure ESM; more consistent public API.
noAnchors
, noScrollbar
.Scroller
on the window
object. (Use direct import
instead.)el
setting is now called element
.useOuterHtml
setting is now useExternalLayout
.onClick
setting is now onItemClick
.anchors
setting is now navigation
.data-anchors
attribute is now data-navigation
.data-central
attribute is now data-focused
.data-start
attribute is now data-start-position
.data-startAnimation
attribute is now data-start-duration
. For turning the animation off, use data-start-duration="0"
..ab_scroller
to .scroller
.end
content alignment point. Can be used with startPosition
and slideTo
.Added TypeScript type annotations (@Beraliv).