Section 01 / 05
Use your mouse wheel or touch to scroll. After you stop, SnapPlugin automatically snaps to the nearest section — no JavaScript needed on your end.
Section 02 / 05
SnapPlugin debounces scroll events. Once the user pauses for snapDebounce milliseconds, it finds the nearest snapSelector element and smoothly scrolls to it.
Section 03 / 05
Pass any CSS selector as snapSelector. Each matching element becomes a snap target. Mix full-height sections with smaller cards — it just works.
Section 04 / 05
The snap animation uses the same easing and duration you configure on the scrollToSmooth instance — including easeInOutElastic if you're feeling adventurous.
Section 05 / 05
Enable snapping with snap: 'nearest' in your options. Everything else has sensible defaults. The plugin registers itself in the pkgd bundle automatically.
SnapPlugin