React Scroll Snap Momentum Hooks
# React Hooks for Smooth Scroll-Snap Sections with Mac Trackpad Momentum Detection 🖱️
Tired of Mac trackpads skipping through your scroll-snap sections like a caffeinated squirrel? This library fixes that with intelligent delta pattern analysis and adaptive throttling.
## Why You Need This
- Trackpad Hell Solved: Detects momentum (inertia) scrolls vs. intentional ones using three key patterns: quick timing, consistent direction, and decaying deltas.
- Cross-Device Magic: Works seamlessly with trackpads, mice, touch, and keyboards.
- Zero Dependencies: Pure React + TypeScript.
- Production-Ready: Polished hooks with full docs, examples, and MIT license.
I built this after a week of debugging scroll nightmares. Read the full story on Dev.to: [your-devto-link]
## What's Inside the Download
- 4 Composable Hooks: useScrollContainer, useHorizontalScrollContainer, useTouchpadDetection, useScrollThrottle
- 2 Complete Examples: Basic vertical scrolling + Advanced with routing/keyboard nav
- Full README with usage, FAQ, and troubleshooting
- CHANGELOG and package.json for easy integration
## Features
✅ Delta pattern analysis for accurate momentum detection
✅ Adaptive throttling (600ms normal / 1800ms momentum)
✅ TypeScript interfaces and JSDoc comments
✅ Debug mode for easy testing
✅ Free 20-min consultation if you need help integrating (reach out via LinkedIn or email)
## Get It Free
Just enter your email below – no spam, just occasional updates when I add features like mobile gestures or infinite scrolling.
⭐ Star on GitHub for the raw code: https://github.com/LinardsLiepenieks/react-scroll-snap-momentum
👉 Try the Live Demo: https://react-scroll-snap-momentum.vercel.app/
Built by Linards Liepenieks – LinkedIn: https://www.linkedin.com/in/linards-liepenieks/ | Email: linardsliepenieks@gmail.com
P.S. If you love it, consider a small tip via "Pay what you want" – funds go to more open-source tools!