Releases: fylgja/snap-slider
Releases · fylgja/snap-slider
v2.2.2
Added
- Added ArrowUp and ArrowDown key support for pager navigation, consistent with ArrowLeft and ArrowRight. Arrow key events on the pager now call
preventDefault()to prevent the page from scrolling. - Added
inertattribute to the pager when the slider has no overflow, ensuring hidden pager controls are fully removed from keyboard and assistive technology focus. - Added support for dynamically showing or hiding slides via
display: none. Hidden slides are excluded from the slide list, and the MutationObserver now watches for style attribute changes on child elements to refresh accordingly.
Fixed
- Fixed rapid navigation triggering multiple scroll jumps by introducing a navigation lock that resets on
scrollend(with ascroll-based fallback for unsupported browsers). - Fixed
getInViewItems()incorrectly including in-view markers from nested sliders by scoping the query to the current instance's slides only. - Fixed the track
tabindexbeing overwritten on re-init if a custom value was already set.
Full Changelog: 2.2.1...2.2.2
v2.2.1
Fixed
- Fixed loop navigation getting stuck when the track contains invalid elements (such as
<template>or<script>tags). Navigation now uses the filtered slides list instead of raw DOM siblings.
Full Changelog: 2.2.0...2.2.1
v2.2.0
Added
- Added a
loopoption (anddata-loopattribute). When enabled, navigation buttons never disable and the slider wraps from the last slide back to the first and vice versa. Available as a modifier in the AlpineJS integration (x-snap-slider.loop).
Fixed
- Fixed an edge case where an empty slider with
group-pagerenabled would throw an error.
Full Changelog: 2.1.0...2.2.0
v2.0.0
Added
- Added an AlpineJS version of the Snap Slider.
Changed
- Refactored the core logic into a reusable
SnapSliderclass.
This class is now used by both the Custom Element and AlpineJS versions,
and can also be used as a standalone option.
Full Changelog: 1.0.0...2.0.0