DEV Community

Cover image for Building Spark Slider: From AI Startup to Open Source
Asher Buk
Asher Buk

Posted on • Edited on

Building Spark Slider: From AI Startup to Open Source

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 / svmin viewport 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:

⭐ Star it on GitHub

πŸ”— 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.