Releases: bespoyasov/scroller
Releases · bespoyasov/scroller
v3.0.2
v3.0.1
Fix possible double initialization when the DOMContentLoaded
event happens after the manual initialization with useExternalLayout
. Prevent instantiation in constructor on initialized elements.
v3.0.0
Weight, dependency, and performance improvements; pure ESM; more consistent public API.
Breaking Changes
- Dropped support for IE and older browsers.
- Dropped support for APIs deprecated in previous releases:
noAnchors
,noScrollbar
. - Stopped exposing
Scroller
on thewindow
object. (Use directimport
instead.) - Public API updates:
- Config
el
setting is now calledelement
. - Config
useOuterHtml
setting is nowuseExternalLayout
. - Config
onClick
setting is nowonItemClick
. - Config
anchors
setting is nownavigation
. - The
data-anchors
attribute is nowdata-navigation
. - The
data-central
attribute is nowdata-focused
. - The
data-start
attribute is nowdata-start-position
. - The
data-startAnimation
attribute is nowdata-start-duration
. For turning the animation off, usedata-start-duration="0"
.
- Config
- CSS class name prefix renamed from
.ab_scroller
to.scroller
. - CSS is now unprefixed since most of the features are supported by most of the browsers.
- CSS custom properties are now used for animations. Be careful if your bundler inlines custom property values into styles.
New Features
- New
end
content alignment point. Can be used withstartPosition
andslideTo
. - The package is now a ES Module, you can access it through import.
- Improved semantics, ability to use lists as component roots.
Plans for Future
- Make the scrollbar accessible via keyboard. (Make it possible to control its position via arrow keys.)
- Consider non-LTR languages when specifying the alignment and destination.
Add TypeScript support
Added TypeScript type annotations (@Beraliv).