Demo: spark-slider.vercel.app
GitHub: github.com/AshBuk/framer-motion-spark-slider
π¦ NPM: @ashbuk/spark-slider
When I first shared Spark Slider with friends, the reaction was the same:
βOh, another React slider.β
Thatβs not entirely wrong β but itβs not the full story either.
I originally built Spark Sliderβs core while working at an AI startup. I wanted something minimal, fast, and visually fluid across laptops, phones, and kiosk screens β without the heavy abstractions of existing libraries like Swiper.
βοΈ What Makes It Different
- Framer Motion animations β subtle blur, opacity, and depth transitions create natural focus.
- Precision drag & swipe β smooth, momentum-free control.
- Accessibility-first β full keyboard navigation and ARIA support.
-
Pure CSS β no Tailwind dependency, uses
svh/svminviewport units. - Lightweight core β ~12 KB gzipped, works with any React environment.
Under the Hood
The library follows a modular architecture with specialized hooks:
-
useSparkSliderβ state & index logic -
useSparkFullscreenβ fullscreen mode -
useSparkKeyboardβ keyboard input -
useSparkTransformsβ dynamic transforms
All motion and interaction parameters are defined in a single source of truth:
config.ts.
Want to change how it feels? Tweak a few constants β and the sliderβs behavior instantly adapts.
π‘ A Thought on Open Source
Itβs a valid takeaway β when a business model changes, itβs easy to just shelve the work and move on.
But making it open source gives that effort a second life β helping others build, learn, and create.
If this project resonates with you:
π Read the full deep dive on my AshBuk.hashnode.dev blog
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.